Installing DADI Web
David Longworth 2016-11-25T14:41:55Z
209 words
1 min read

NPM

All our platform microservices are available from NPM. To install Web.

$ npm install @dadi/web

Manual install

If you do not want to use NPM, you can grab the latest release. Then you can install:

$ cd ./release-download-location/
$ npm install

Using DADI Generator

We have our own tool to handy tool to generate new applications easily.

$ npm install -g @dadi/generator
$ dadi-generator web /path/to/your_new_app
$ cd /path/to/your_new_app
$ npm install
$ npm start

Dependencies

You can see our full list of dependencies in the package.json.

Tests

If you have installed manually, you can run tests by:

$ npm run test

Forever (optional)

As with most Node.js applications, to run the app in the background you will need to install install Forever and Forever-service:

$ [sudo] npm install forever -g
$ [sudo] npm install -g forever-service

Install DADI Web as a service and ensure it loads on boot:

$ [sudo] forever-service install -s main.js -e NODE_ENV=production web --start

Note the environment variable NODE_ENV=production must be set to target the required config version.

You can then interact with the service using the following command:

$ [sudo] start web
$ [sudo] stop web
$ [sudo] status web
$ [sudo] restart web

And you’re done, now move on to configuration.

See something to improve? Edit in Github.