Generated by Node Project Generator.
A playground for Koa with Authentication and Authorization.
- Clone the repo
$ git clone https://github.com/robertoachar/playground-koa-auth.git
- Install dependencies
$ npm install
- Run scripts
Action | Usage |
---|---|
Start development mode | npm start |
Lint code | npm run lint |
# .env file
NODE_ENV = development
DATABASE = mongodb://localhost:27017/playground-koa-auth
PORT = 3000
JWT_SECRET = secret
Method | Endpoint | Description |
---|---|---|
POST | /auth/signup |
Create an account |
POST | /auth/login |
Log In |
GET | /auth/profile |
User profile (must be authenticated) |