###Prerequisites
- install GIT
- install npm.js - only version 1.4.28 is supported
- install node.js -versions 10.33 and 10.38 are supported
- install mongodb -only version 2.6.x is supported
- Follow install for your OS @ https://github.com/TooTallNate/node-gyp/blob/master/README.md#installation
###Download / Clone
-
Clone Admin repo
git clone https://github.com/sapbuild/Admin.git
-
Install required node modules (dependencies):
npm install -g grunt-cli cd Admin sudo npm install
-
Initialize the database (required just the first time if not already done by BUILD):
cd server node initSchema.js node setDefaultAccess.js cd ..
-
Start the BUILD application (for Dev):
grunt serve
Go to http://localhost:9001 in Chrome browser and click Join
###Debugging the Node.js backend Starting BUILD Admin with "grunt serve" will start the debug server on the default port 5858. You can connect to this debugger session with tools like Webstorm or node-inspector. The easiest and fastest way to debug the Node.js backend is to use node-inspector. You can install node-inspector globally via:
npm install -g node-inspector
and connect then to the running server via
node-inspector --no-preload
The option --no-preload will speed up the initialization dramatically as it doesn't preload all source files, but loads them when necessary.
Please note that the Admin role is ONLY needed for BusinessCatalogManager and is not needed to access the Admin UI:
1 - Go to Admin\server
2 - Script for admin creation : node createAdmin.js --name --password --email
Note: this script creates a user with a Standard and an Admin roles.
To manage the emails blacklist, you can use the optout-script.js in server/. The first argument is the action you want to perform (add or remove) and all the following arguments will be email addresses.
node optout-script.js add|remove email1 email2 ... emailn
node optout-script.js add [email protected] [email protected]
Will add [email protected] and [email protected] to the blacklist.
node optout-script.js remove [email protected]
Will remove [email protected] from the blacklist.
- Remove the projects owned by this user from projects collection,
- Remove the user from project user list (remove from participant list),
- Remove the studies belonging to the deleted project from studies collection,
- Remove answers and annotations made by the user in studies he participated in,
- Remove user + deleted projects from roles collection,
- Remove user from users collection.
Click here to visit the central BUILD project on GitHub, where you can find out more!
Click here to view the BUILD Contribution Guidelines.