Getting started

The dev server will automatically open with a default application if no parameters are given. The page will be similar to this one telling you how to use it in the command line. What is done when server is opened with no parameters is that a default application from programdata is opened in the server. It will demo most of the things you can do in a server application by simple examples. The application can be opened in DataEase by clicking on the Open in DataEase link in the menu. 


DataEase Development Server howto

To use this server you need enter the command line. The command line can be reached by pressing start and type cmd. In the command line you have to locate the path where DataEase Development Server is installed. The development server is installed in a subfolder named dedevserver in the same directory as DataEase. In an English Windows 10 x64 version that will usually be "C:\Program Files (x86)\DataEase\DataEase 9.0\dedevserver".

Commands and parameters

The command for starting DataEase Development Server is dedevserver.exe.

The parameters to use are

[Listen to] This is the port the server will listen to. The port is read from rdrrxaaa.ini if not set here. A port will automatically be set and added to the ini file if not found the first time.

A normal web server uses port 80 so when you write http://www.dataease.com into your browser this will automatically go to port 80. This port is usually in use by some other service on your computer, so for your DataEase Development Server port is randomly selected on first start. To reach your server when using port 8026 you will enter http://127.0.0.1:8026 into your browser. The :8026 then indicates the port number and the 127.0.0.1 is a default address used to reach your local computer from your browser.
App path This is the path to your DataEase application.
Name The name given to the application.
[User name] The username prism is using to log into the application. If you use somthing else than a high user, you might get into trouble acceessing data. Restrictions for the web application should rather be defined in the web application and not in the server.
[Password] The corresponding password for the user.
[WebTable] Name of table used for the server pages, templates and definitions.
[StaticAppPath] Path to the folder used to serve static files in the application. All files here will be merged into the server name space.
[StaticPath] Path to the folder used to serve common files like the deconnect.js library. All files here will be merged into the server name space.
--hide or /hide Hide the console window when starting up.
--listentoprogramfolder This will make the server listen for changes in [StaticPath] folder instead of to [StaticAppPath] that is the default. We can only listen to one of them for changes. This can be of interest if you develop common libraries for you company and do not want to restart server for each change.

Ex:

C:\Program Files (x86)\DataEase\DataEase 9.0\dedevserver>dedevserver 8000 C:\Users\Me\Apps\MyApp TheAppName

This will start a server that will respond to any url at port 8000 and open your app at the given path with no username or password.


Where to place the files

The server have two places where it will read static files like html, js, css, png, jpg and the like. All urls with an extension will be read from these folders. It will start with the app specific folder then the shared folder.

First it will look for the file in a sub-directory named static in you DataEase 9 application folder for application specific files. Next all common files used for all your DataEase Development Server applications will be read from the static folder inside the DataEase folder. These two folders can be set by startup parameters for the server. The one in your dataease application folder will hold common libraries needed by the Auto form on other default functionality, so make sure you copy all files from deserver folder if you want to create your own shared folder.


How to get, put, create and delete data

DataEase Development Server is a JSON based REST server as well as a full content manager delivering pages and template from a DataEase application.

The REST part means that the HTTP protocol is used to tell the server what to do. A GET gives you data, a PUT updates data, a POST creates new data and a DELETE removes data. To be able to do this, you must use the url in your request to tell the server what to do. For a proper description of how to do it have a look in the documentation.

Ex. of getting data

http://127.0.0.1:8099/maindata/Address/0/?Name=b*

Gives you the first record of the table Address that have a Name (the field Name) that starts on a b. This works on a developments server since you are a user with High security as default.

Editing pages and templates

To edit and create pages and templates, you simply opens the application in DataEase and edits the data in the WebServer table or even better just at files in your static folder. This page consists of one template having the structure of a standard html page with the menu, the footer and all the nitty gritty details. Then you have a page that tells the server what url to use when serving this page and the text on the page. The url for this page is / that means this is the home page. The template is set to be "default". Any other page you create can use the same template or an another template. If you use the same template, the page will have the same structure as this but a different text in the middle.