Auth web service for Scorum
$ git clone git@github.com:scorum/blog-auth-ws.git .
$ yarn
$ yarn start
OR
$ npm install
$ npm start
npm run
scripts.bluebird
featured promise library.eslint
as JavaScript linter.prettier
code formatting, configured to work witheslint
out of the box.husky
for git hooks.koa-bodyparser
for parsing request bodies.koa-helmet
adds important security headers.koa-validate
validate request params and format request params.koa2-cors
CORS middleware for cross-domain requests.dotenv-safe
for environment variable management.winston
for logging.lodash
utility library.mongoose
as 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') });