Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 3 days ago
JSON representation

Simple starter kit for using KoaJS to build a web application written in ES7.

Awesome Lists containing this project

README

        

## KoaJS Starter Kit —

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