Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codeaholicguy/koajs-starter-kit
Simple starter kit for using KoaJS to build a web application written in ES7.
https://github.com/codeaholicguy/koajs-starter-kit
es7 koajs starter-kit
Last synced: about 1 month ago
JSON representation
Simple starter kit for using KoaJS to build a web application written in ES7.
- Host: GitHub
- URL: https://github.com/codeaholicguy/koajs-starter-kit
- Owner: codeaholicguy
- Created: 2017-10-31T13:32:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T08:34:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T02:20:55.457Z (about 1 month ago)
- Topics: es7, koajs, starter-kit
- Language: JavaScript
- Homepage:
- Size: 1.26 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple starter kit for using KoaJS to build a web application written in ES7.
## Getting Started
Just clone and explore it!
## Sample
```js
@controller('/sample')
export default class SampleController extends BaseController {
@get('/hello/:name')
async sayHello(ctx, next) {
ctx.body = `Hello ${ctx.params.name}`
}@get('/goodbye')
async goodbye(ctx, next) {
ctx.status = HttpStatusCodes.OK
}
}
```## Commands
```
yarn start
```Start your web application at `localhost:3000`. You can also specify the port by `PORT=8080 yarn start`.
```
yarn test
```If you want to run the test suite. I use Jest for testing.
## License
MIT