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

https://github.com/brundonsmith/courier

Super simple Express-like wrapper for Deno's built-in HTTP server
https://github.com/brundonsmith/courier

deno expressjs server typescript

Last synced: 3 months ago
JSON representation

Super simple Express-like wrapper for Deno's built-in HTTP server

Awesome Lists containing this project

README

          

## Example usage

```typescript
import { create } from 'https://raw.githubusercontent.com/brundonsmith/courier/master/index.ts'

const app = create()

app.use(['**'], req => {
console.log('Middleware activated for request to ' + req.url + '!')
return req
})

app.get(['/greeting'], () => new Response('Hello world!'))

app.get(['/stuff', ':myParam'], (req, params) => {
return new Response(JSON.stringify(params))
})

app.listen(8000)
```