Auth web service for Scorum
$ git clone git@github.com:scorum/blog-auth-ws.git .$ yarn
$ yarn start
OR
$ npm install
$ npm startnpm runscripts.bluebirdfeatured promise library.eslintas JavaScript linter.prettiercode formatting, configured to work witheslintout of the box.huskyfor git hooks.koa-bodyparserfor parsing request bodies.koa-helmetadds important security headers.koa-validatevalidate request params and format request params.koa2-corsCORS middleware for cross-domain requests.dotenv-safefor environment variable management.winstonfor logging.lodashutility library.mongooseas elegant mongodb object modeling for node.js.
There are a few defined run scripts, here's a list of them with a description of what they do. To run them, simply execute npm run <script name> - e.g. npm run lint
start: Used for simple start app.test: Runs testslint: Lints
Rename (or copy and rename) .env.example into .env
cp .env.example .env
The environment variables can be reached via dotenv package.
require('dotenv-safe').config({ allowEmptyValues: true, path: path.join(__dirname, '/.env') });