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
- Host: GitHub
- URL: https://github.com/brundonsmith/courier
- Owner: brundonsmith
- Created: 2022-05-13T05:28:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-29T02:28:21.000Z (over 3 years ago)
- Last Synced: 2025-02-23T00:41:28.950Z (over 1 year ago)
- Topics: deno, expressjs, server, typescript
- Language: TypeScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
```