Starter for an API server using Koa2 and Mongoose (MongoDB server) with mock model + testing etc
Pull request Compare This branch is 9 commits ahead, 2 commits behind recurship:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc/api
env
src
test
.babelrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
README.md
package.json
yarn.lock

README.md

Api-Koa2-MongoDB-Starter

Quick Start

This starter works with npm or yarn.

Install:

yarn # or npm install

Run in dev mode, restarting the server on file changes:

yarn dev

# If you want to generate fresh tables
resetdb=true yarn dev

Run unit tests:

yarn test

Run in prod mode, not daemonized, with staging config (suitable for Heroku):

yarn build
yarn start

Start/stop in prod mode, daemonized, with local config:

yarn build
yarn local:start
yarn local:stop

Start/stop in prod mode, daemonized mode, with staging config:

yarn build
yarn staging:start
yarn staging:stop

Build (or update) the API documentation to api.html in the root:

yarn raml

Setup

Node.js (for local environment)

Download the latest stable version and install it on your machine: https://nodejs.org/en/download/

Verify it after the installation by running following commands.

$ node --version
$ npm --version

MongoDB (for local environment)

Follow the instructions from this blog post: https://scotch.io/tutorials/an-introduction-to-mongodb

Contributing

About Me

My name is Narain Sagar, I’m a FullStack JavaScript Developer, lives in Karachi, Pakistan and pretty much enjoying my life.

@narainsagar

Follow Me 👍

Medium | Website | Twitter | LinkedIn | Facebook | Github | Stack Overflow

License

MIT - Narain Sagar narainmenghwar@gmail.com