Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maotora/koa-userapi
Koa-v2 user api.
https://github.com/maotora/koa-userapi
api jwt-authentication koa2 mongoose passportjs tests
Last synced: 25 days ago
JSON representation
Koa-v2 user api.
- Host: GitHub
- URL: https://github.com/maotora/koa-userapi
- Owner: maotora
- Created: 2016-12-31T06:40:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T14:29:41.000Z (almost 7 years ago)
- Last Synced: 2024-08-03T18:13:34.331Z (4 months ago)
- Topics: api, jwt-authentication, koa2, mongoose, passportjs, tests
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-koa - koa-user-api-boilerplate - User API boilerplate using Koa2, Full ES6 & 7 support, Passport & JWT with tests. (Examples & Boilerplates)
README
# Koa User Api Example.
Koa v2 user api.
## Contains
* `koa-rest-router`.
* `koa-better-body`.
* `koa-passport` with `passport-jwt` & `passport-local` Auth
* `jwt-simple` creating my jwts.
* `mongoose`.
* async/awaits *If I should even mention this*.### App Preparations.
Run your `mongod` service.
**Unix**
$ systemctl start mongod.service
**Windows**
> md C:\data\db && path/to/mongo/bin/mongod
Install npm packages from `package.json`
npm install
**Run App**
Start compiling ES2016/2017 files.
npm run watch
Start server with (uses files from `/dist/server` so you need the above step
for this to work properly.npm run start
**Tests**
Run tests with
npm run test
Watch them as you code with
npm run test:watch
Contribution welcome!
Special Thanks to:
- [tunnckoCore](https://github.com/tunnckoCore/)
- [rkusa](https://github.com/rkusa/)