Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Latest commit

 

History

History
32 lines (20 loc) · 1.08 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.08 KB

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 })