# tun

tun framework for node with typescript

## install

```sh
npm install @tunframework/tun
```

## example

```js
import { TunApplication } from '@tunframework/tun'

const app = new TunApplication()

app.use(async (ctx, next) => {
  return `Hi, world!`
})

const server = app.listen({ host: '127.0.0.1', port: 0 })

server.on('listening', async () => {
  // @type {AddressInfo}
  let addr = server.address() || {}
  console.log(`listening: http://${addr.address}:${addr.port}`)
})
```
