Skip to content

Koa Integration

Koa integration is similar to Express integration. It doesn't require a separate installation, you only need to install the main unioc package.

Creating and Starting the App

ts
import { 
KoaApp
} from 'unioc/web-koa'
async function
bootstrap
():
Promise
<void> {
// Create a Koa application const
app
= new
KoaApp
({
// Pass configuration options for `new Koa()` here }) // Run directly await
app
.
run
(3000, () => {
console
.
log
(`Koa server is running at http://localhost:3000`)
}) }
bootstrap
()

Contributors

Changelog