Dashboard displaying metrics for Collab.
- Please set up Collab before setting up the dashboard. This will take care of the databases and various shared dependencies.
- Use Node v8 to setup
-
Clone repository to Collab-tools root folder.
$ git clone https://github.com/collab-tools/collab-dashboard.git
-
Create
config/local-dev.json
using theconfig/_local-template.json
template. If unsure, please contact a fellow engineer!cp config/_local-template.json config/local-dev.json
-
Enter config details in local-dev.json (DB details same as that provided for collab config)
-
Link collab-db-applications and collab-db-logging. Run the following command from the root folder of collab-dashboard.
$ sudo npm link collab-db-application collab-db-logging```
-
Install dependencies
# Install server dependencies $ sudo npm install # Install client dependencies $ cd public/ $ sudo npm install $ sudo npm install -g grunt-cli bower $ bower install
-
Build the server
$ cd ../ $ sudo npm install babel-preset-env $ sudo npm run compile
-
Run the server. Server should start on port 4000.
npm run dev
-
Create an admin user (username: admin ; password : veryverysecretpassword) by running the following in a new terminal.
# (Assuming the email of the admin is [email protected] and developer_key is set to 12341234 in config/local-dev.json) $ curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'devKey=12341234&[email protected]' "http://localhost:4000/api/auth"
-
Serve the client files
-
Use nginx for reverse proxying
/api/*
requests to the server. To install nginx :$ sudo apt-get install nginx
-
You might have to stop apache before starting this service, if both services run on the same port.
$ sudo service apache2 stop```
-
Add the following to root\etc\nginx\nginx.conf (within http{}) and root\etc\nginx\sites-available\default
server { listen 9000; # Replace this with the path to your collab-dashboard/public/dist/ directory root /vagrant/collab-dashboard/public/dist/; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location /api/ { proxy_pass http://127.0.0.1:4000; } location ~* ^/app { try_files /$uri /app/index.html; } location / { try_files $uri $uri/ /app/$uri /app/index.html; } }
-
Start nginx service :
$ sudo service nginx restart```
-
-
If run in local server:
- start server at
/collab-dashboard
by runningnpm run dev
- start client at
/collab-dashboard/public
by runninggrunt build
andgrunt watch
- Open http://localhost:4000 on your browser and login with admin credentials.
grunt build
to build client assets.grunt watch
to watch for changes and build client assets.