Generated by Node Project Generator.
A playground for Koa.
- Clone the repo
$ git clone https://github.com/robertoachar/playground-koa.git
- Install dependencies
$ npm install
- Run scripts
Action | Usage |
---|---|
Start development mode | npm start |
Lint code | npm run lint |
# .env file
NODE_ENV = development
PORT = 3000
Method | Endpoint | Description |
---|---|---|
GET | / |
Get plain text data |
GET | /json |
Get JSON Data |
GET | /user/:id |
Get data with params |
POST | /hello |
POST data |
GET | /not-found |
404 Not found |
GET | /throw |
422 Unprocessable Entity |
GET | /error |
500 Internal Server Error |