node-http

GitHub Workflow Status Coverage

⚠️ DEPRECATED! Use std/http instead.

Node.js-like HTTP server for Deno. Makes porting web things from Node (a little bit) easier.

Example

import { createServer } from 'https://deno.land/x/node_http/mod.ts'

const s = createServer((req) => req.respond({ body: 'Hello' }))

s.on('error', (err) => console.log(err))

s.on('listening', () => console.log(s.address()))

await s.listen({ port: 3000 })