ooboqoo / koa-mongo

Koa2 + Mongoose + TypeScript Playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

koa-mongo

Koa2 + MongoDB + TypeScript Playground

Get Started

Please make sure the MongoDB service is running before starting the app!

$ npm install
$ npm start

Document

Please refer to the folder doc for more information.

Deploy

For security reason, please put the secret information in config/production.json, i.e.

{
  "dbUrl": "mongodb+srv://<user>:<password>@<cluster>.bqgte.mongodb.net/<dbname>?retryWrites=true&w=majority",
  "jwtSecret": "your-secret-word"
}

This file should be placed when deploying only, then run NODE_ENV=production node dist/app.js.

Dependencies

  • config - organizes hierarchical configurations for your app deployments

  • koa-jwt - Koa middleware for validating JSON Web Tokens

Body Parsing

DevDependencies

  • nodemon - Monitor for any changes in your node.js application and automatically restart the server - perfect for development

About

Koa2 + Mongoose + TypeScript Playground


Languages

Language:TypeScript 62.1%Language:HTML 36.5%Language:JavaScript 1.3%