Skip to content

NodeJS application to serve password protected dashboards

License

Notifications You must be signed in to change notification settings

mjvanderveen/dashboards

Repository files navigation

Before You Begin

Before you begin we recommend you read about the basic building blocks that assemble this application

Prerequisites

Make sure you have installed all these prerequisites on your development machine.

$ sudo apt-get install nodejs
$ sudo apt-get install npm
$ sudo apt-get install mongodb
  • Make sure mongodb is running as a service
  • Install Robomongo on windows for a GUI to access the objects stored in mongodb

sudo apt-get install mongodb

  • Bower - You're going to use the Bower Package Manager to manage your front-end packages, in order to install it make sure you've installed Node.js and npm, then install bower globally using npm:
$ sudo npm install -g bower
  • Grunt - You're going to use the Grunt Task Runner to automate your development process, in order to install it make sure you've installed Node.js and npm, then install grunt globally using npm:
$ sudo npm install -g grunt-cli
  • Install NPM modules - Now you have to include all the required packages for this application. These packages are not included by default in this repository. The below command will install all required npm modules in package.json to node_modules/. After that it will run bower-installer, which uses bower.json to include all client side libraries, and puts these in public/build/bower
$ npm install
  • Apache - The application can run on its own on the nodejs server, however, in many cases we would need to host multiple applications on a subdomain of a server. Apache will therefor serve as a proxy only.

  • Make sure you install apache through [xamppserver] (https://www.apachefriends.org/download.html) for windows, or use the apache2 installer for unix. Use the httpd.conf in tools/ (for windows, or alter for unix). Rename the localhost example key and certificate in config/cert/ by removing the .example extension

Getting Started With the Dashboard

Edit the config/secrets.json.template to set your project secrets and save it to config/secrets.json

Make sure the certificates mentioned in the secrets.json are located in the config/cert/

WINDOWS

windows: run apache through the xampp GUI application: go to the route of the dashboard app and run either of the following commands:

  • node-debug server.js (to launch node-inspector for server-side debugging)
  • grunt (no server side debugging)

UNIX

The apache service needs to be running, as it is serving as a proxy: unix: sudo service apache2 start|stop|restart (The apache config files are located in /etc/apache2/sites-available/) The dashboard upstart script needs to be running, which will start the node server: sudo start|stop digidoc The upstart script is located in /etc/init/dashboards.conf

If for whatever reason you need to debug on the production server, use this command: sudo NODE_ENV="development" PATH=$PATH node-debug /var/www/dashboards/server.js

About

NodeJS application to serve password protected dashboards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published