https://github.com/trawor/template-node-koa
NodeJS koa2 project template
https://github.com/trawor/template-node-koa
koa koa2 nodejs nodejs-server oneline template
Last synced: about 1 month ago
JSON representation
NodeJS koa2 project template
- Host: GitHub
- URL: https://github.com/trawor/template-node-koa
- Owner: trawor
- License: mit
- Created: 2019-03-04T08:07:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T06:37:36.000Z (over 7 years ago)
- Last Synced: 2025-10-19T07:24:44.837Z (8 months ago)
- Topics: koa, koa2, nodejs, nodejs-server, oneline, template
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-node-koa
NodeJS koa2 project template, start your koa in 5 secends!

## Features
- Muilt-CPU supports (cluster)
- Simple color log (console override)
- Add-to-use router(autoload files under 'router' folder)
- Exception handle
- Dockerfile within
## Init
`bash <(curl -sSL https://github.com/trawor/template-node-koa/raw/master/get.sh)`
## Start
Just add .js file to `router/`, like:
```javascript
const router = require('koa-router')({
prefix: 'api',
});
module.exports = router;
router.get('/test', async (ctx) => {
ctx.body = {
msg: 'ok',
};
});
```