An OAuth2 authorization server supporting OpenID Connect
Clone the project from github and install dependencies:
git clone https://github.com/rabiran/OSpike.git
npm install
After that, in package.json file, you'll find 3 npm scripts named: generate-env-[prod/dev/test].
Adjust your settings in each one of them for generating appropriate .env file for the project.
-portThe port of the server. e.g.-port 1337
-hostnameThe hostname of the project url. e.g.-hostname google.com
-mongoUrlThe url of the mongo db of the project. e.g.-mongoUrl ds11232.mlab.com:12345/db_bla_bla
-usernameThe username of the db. e.g.-username admin
-passwordThe password of the db user. e.g.-password 123456
-hostValidationEnabling host validation, value should be0for disable or1for enable. e.g.-hostValidation 1
-logsDirThe directory path used for log files. Default value: 'logs'. (in the same hierarchy as src)
-logFileNameThe name of the log file. Default value: 'ospike-log.txt'
-shragaUrlFull URL to Shraga server for handling the authentication of end userOPTIONAL Settings:
-apmServiceNameOPTIONAL: Used in production only - The Elastic APM service name
-apmServerUrlOPTIONAL: Used in production only - The Elastic APM server url
-apmSecretTokenOPTIONAL: Used in production only - The secret token for accessing the Elastic APM server
And just run:
npm run init
npm start
The init script ensures you got all the configuration needed for the project.
NOTE: For changing the environment, simply run npm run generate-env-[prod/dev/test] for the specific environment.
After that, any time you want to use the project again, simply run npm start.