Server-side services for the Collaborative Informatics and Neuroimaging Suite To Aide Consortia // TODO: update acronym definition
- CouchDB
- NodeJS (v12)
git clone [email protected]:MRN-Code/coinstac-server; cd coinstac-server;npm inpm startThis will start CouchDB as a background process on the standard port, then start the Node server in the foreground.
Note: to stop the CouchDB daemon, run npm stop
npm test
Retrieve a list of all registered users.
Retrieve a specific users' info.
Add/register a new user. Returns the id and rev of the user. // TODO: Also log the user in, and return their API key // TODO: Implement email verification
Retrieve a list of all consortia
Retrieve a specific consortium's info.
Add a new consortium. Returns the id and rev of the new consortium. The payload should be an object with the following properties
{
label: {string},
description: {string},
users: {array},
tags: {array}
}Update an existing consortium.
The payload should have the same properties as that for POST /consortia, in
addition to _id and _rev.
Attempt to login with a username and password.
Username and password should be passed in the headers in the following form:
Authorization: 'Basic ' + (new Buffer('uname:pwd')).toString('base64')
If successful will return a HAWK key pair for use in signing future requests.
Logout. This will invalidate the HAWK key pair used to make this request. It is up to the client to discard the HAWK key pair on its end.
- helpful
couchdbutilities may be found incouch-util.js. For example:node couch-util.js --dddeletes all couchdb databases on your server. tread with caution! :)
[] Implement ath routes and protect actions that should require login [] Add routes for tags [] Add validation to payloads received [] Add persistent tracking of server-side analyses to be performed per consortium. [] Migrate hapi-pouch.js to full-on plugins
Please submit any changes to this repo (including additions and subtractions from the lint config files) as pull requests.