The goal is to provide a reporting platform which automatically creates reports from data sources so volunteers can show and see what they are contributing too.
Requirements:
- Node 7 or higher
- MongoDB locally installed on your machine
$ cd server
$ npm install
$ npm start
Create server/config.json
and add the values from the following json, you will need to get the values from your auth0.com instance.
{
"auth": {
"AUTH0_DOMAIN": "<AUTH0_DOMAIN>",
"AUTH0_CLIENT_ID": "<AUTH0_CLIENT_ID>",
"AUTH0_CLIENT_SECRET": "<AUTH0_CLIENT_SECRET>",
"CALLBACK_URL": "http://localhost:3000/authCallback",
"RETURN_AFTER_LOGIN_URL": "http://localhost:3001",
"RETURN_AFTER_LOGOUT_URL": "http://localhost:3001",
"CLIENT_LOGIN_URL": "http://localhost:3001/login"
},
"session": {
"secret": "You're secret here!"
}
}
Now you can reach the API through localhost:3000
.
If you want to watch for changes and automatically restart the server after changes, you can install node-dev and then start the watch tasks.
$ npm install -g node-dev
$ npm run watch
Make sure you have installed gulp and gulp-cli. See: Readme for reference.
Use the gulp serve
command for development.
Use the gulp build
command to build a dist folder.
You can reach the Frontend trough http://localhost:3001
.
The Browsersync UI can be reached through http://localhost:3002
.
TBD
- Set up an account on auth0
- Create a new client and add the secrets to the
config.json
file - Add the
CALLBACK_URL
value fromconfig.json
to the "Allowed Callback URLs" textarea - Add the
RETURN_AFTER_LOGIN_URL
value fromconfig.json
to the "Allowed Origins (CORS)" textarea - Add the
RETURN_AFTER_LOGOUT_URL
value fromconfig.json
"Allowed Logout URLs" textarea - (Weird, but did not find any workaround) Add the
RETURN_AFTER_LOGOUT_URL
value fromconfig.json
to the "Allowed Logout URLs" textarea in your account (!) as well - (Temporary until we can get the content from the server) Add the client ID and the domain from the
config.json
to thelogin.js
controller inclient/src/app/components/login
as well.