Buckets:
| const http = require('http') | |
| const router = require('./')({ | |
| defaultRoute: (req, res) => { | |
| res.end('not found') | |
| } | |
| }) | |
| router.on('GET', '/test', (req, res, params) => { | |
| res.end('{"hello":"world"}') | |
| }) | |
| router.on('GET', '/:test', (req, res, params) => { | |
| res.end(JSON.stringify(params)) | |
| }) | |
| router.on('GET', '/text/hello', (req, res, params) => { | |
| res.end('{"winter":"is here"}') | |
| }) | |
| const server = http.createServer((req, res) => { | |
| router.lookup(req, res) | |
| }) | |
| server.listen(3000, err => { | |
| if (err) throw err | |
| console.log('Server listening on: http://localhost:3000') | |
| }) | |
Xet Storage Details
- Size:
- 599 Bytes
- Xet hash:
- 8b8a80c5271f57c3faa89855c04952cb5f379f90b6bcfd03911bbf354c0c4831
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.