/docs/src/pages/de/

f='https://git.anshulg.com/ansg191/bun/atom/src/bun.js/api/server.zig?h=ciro/queue-response-experiment' type='application/atom+xml'/>
aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/server.zig (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-22Fix `Buffer.isEncoding`Gravatar Jarred Sumner 1-1/+3
2022-08-22Add some optimizations to FetchHeadersGravatar Jarred Sumner 3-16/+188
2022-08-22Fix import pathGravatar Jarred Sumner 1-1/+1
2022-08-2238% faster `node:http`Gravatar Jarred Sumner 1-77/+203
Before: ```fish ❯ oha http://localhost:3000 -z 2s -c 20 Summary: Success rate: 1.0000 Total: 2.0006 secs Slowest: 0.0095 secs Fastest: 0.0000 secs Average: 0.0003 secs Requests/sec: 69521.0420 ``` After: ``` ❯ oha http://localhost:3000 -z 2s -c 20 Summary: Success rate: 1.0000 Total: 2.0005 secs Slowest: 0.0063 secs Fastest: 0.0000 secs Average: 0.0002 secs Requests/sec: 109119.8614 ``` Code ``` const http = require("http"); const hostname = "127.0.0.1"; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader("Content-Type", "text/plain"); res.end("Hello World!"); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); }); ```