MEAN app for creating collections of authenticated ORCID iDs
- MongoDb Community Server
- NodeJS 6.9.0 or higher
- NPM 3 or higher
- Angular CLI 1.0 or higher
- Mailgun Private API Key
- Mailgun Public Validation Key
git clone git@github.com:ORCID/share-my-id.git
cd ~/git/share-my-id
npm install
<path to mongo installation directory>/mongod --dbpath <path to mongo data directory>
<path to mongo installation directory>/mongo
Paths vary depending on your OS and installation method - see MongoDB Manual for more info and alternate startup instructions.
use smid;
db.createUser({
user: "smid_user",
pwd: "devpassword",
roles: ["readWrite"]
});
npm start
8. Open localhost http://localhost:8080/
npm start
builds Angular source files into the /dist directory once and starts the server; changes will not be rebuilt/reloaded. To rebuild/reload changes automatically:
-
Install nodemon
npm install -g nodemon
-
Start node server with nodemon
nodemon server.js
-
In separate tab/window, build the Angular project and watch for changes
ng build -w
This example is configured with default test credentials on the ORCID Sandbox. You can optionally supply your own sandbox credentials.
1. Register for sandbox credentials at http://orcid.org/content/register-client-application
When registering include the redirect_uri 'https://localhost'
Example in bash:
export CLIENT_ID='APP-3BI8IQ5O8DREEAVF'
export CLIENT_SECRET='35d8f715-9121-440c-ad34-b66cb8c4e884'
export ORCID_URL='https://sandbox.orcid.org'
export PORT_HTTP='8080'
export HOST='http://localhost:8080'
Example in bash:
export MAILGUN_PRIV_API_KEY='************************-********-********-'
export MAILGUN_PUB_API_KEY='pubkey-************************'
export MAILGUN_DOMAIN='********.mailgun.org'