Step 3 Build and run application

For all further commands, run command prompt as Administrator.

Go to the application folder cd c:\workspace\framework``and set the environment variable  ``NODE_PATH equal to the path to the application. For Windows: command set NODE_PATH=c:\workspace\framework, for Linux: export NODE_PATH=/workspace/framework.

Build application

Building the application provides installing all the libraries, importing the data into the database, and preparing the application to run.

  1. At the first launch, you need to run npm install command to install key dependencies, including the gulp task runner locally. Make sure that the Gulp version is 4.0. This command will install all the libraries from the ``dependencies``property of ``package.json``file of the core.

  2. After that, and in all the next times, run the command gulp assemble to build the application.

    NB: Make sure that the environment variable NODE_PATHis set, the MongoDBdatabase is running, the Gulp is globally and locally installed and its version is``4.0``.

  3. Before launching the application, add a basic user for logging in. Open``Mongo Compass`` app and find the ion-user``table in the database. Delete all the records you see there. Then go back to the console and execute the commands below. Add ``admin user with 123 password using command node bin/adduser.js --name admin --pwd 123. Add administrator rights to the user using command node bin/acl.js --u admin@local --role admin --p full.

Launch application using scripts

The bin folder contains the scripts to run applications based on the IONDV.Framework, such as:

  • acl.js
  • export.js
  • import.js and import-data.js
  • setup.js
  • www.js
NB. Запускаются локально из папки framework, шаблоны команд указаны в разделах с описанием назначения скрипта.

More details about application launch scripts

Run application

After finishing the build you can launch the app. Make sure that the environment variable NODE_PATH is set. If skipping this step, the system will show the missing components error.

The system is launched by the command npm start, alternative launch is node bin/www.

After launching the system, open the browser with http://localhost:8888``adress and log in to the application, where ``8888 is a port specified in the server.ports parameter in the launch configuration.