https://github.com/ooboqoo/koa-mongo
Koa2 + Mongoose + TypeScript Playground
https://github.com/ooboqoo/koa-mongo
koa mongodb mongoose typescript
Last synced: 3 months ago
JSON representation
Koa2 + Mongoose + TypeScript Playground
- Host: GitHub
- URL: https://github.com/ooboqoo/koa-mongo
- Owner: ooboqoo
- Created: 2017-01-13T01:08:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T18:31:01.000Z (over 3 years ago)
- Last Synced: 2024-04-12T15:38:18.781Z (about 2 years ago)
- Topics: koa, mongodb, mongoose, typescript
- Language: TypeScript
- Homepage:
- Size: 301 KB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koa-mongo
Koa2 + MongoDB + TypeScript Playground
## Get Started
> Please make sure the MongoDB service is running before starting the app!
```bash
$ npm install
$ npm start
```
## Document
Please refer to the folder [doc](./doc) for more information.
## Deploy
For security reason, please put the secret information in _config/production.json_, i.e.
```js
{
"dbUrl": "mongodb+srv://:@.bqgte.mongodb.net/?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](https://github.com/lorenwest/node-config) - organizes hierarchical configurations for your app deployments
* [koa-jwt](https://github.com/koajs/jwt) - Koa middleware for validating JSON Web Tokens
### Body Parsing
* [koa-bodyparser](https://github.com/koajs/body-parser) - a body parser for Koa, based on co-body
* [koa-multer](https://github.com/koa-modules/multer) - handling multipart/form-data for Koa
## DevDependencies
* [nodemon](http://nodemon.io/) - Monitor for any changes in your node.js application and automatically restart the server - perfect for development