aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/http.exports.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 1-11/+23
* @min and @max * builtins and some trivial ones * Most of them * more * more! * More Progress * wip * Update tagged_pointer.zig * Update http_client_async.zig * Most of the iterable dir changes * alright * Remove usages of deprecated formatters * :camera: * fmt * Update shimmer.zig * wip * wip * wip * progress * more * Latest * stuck on error * latest * workaround stage2 * wip * Update string_immutable.zig * wip * Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings * Fix build errors * Fixup most of the test failures * Fix `make headers` * Fix "outside package path" error * Fixup aligned alloc * Add missing file * linux * More linux fixes * use latest peechy * Fix transpiler test failure * Forgot about these * Fixup test failure * Update node-timers.test.ts * [node:htt] Fix `undefined is not an object` error Fixes https://github.com/oven-sh/bun/issues/1618 * Update http.exports.js * Make this test less flaky * fix hashes * Fix hex formatting and zls issues * Download zig version * Update Dockerfile * Update Dockerfile * Update uws * Update Dockerfile * Set llvm version * Update README.md * Update uws * Update Dockerfile * Update io_linux.zig * Update bun.zig * Log output * workaround strange @cInclude error * Make ffi tests better * Don't use cImport * Update c.zig * Update c-bindings.cpp * call setOutputDir * Update Dockerfile * Use a longer name * latest * Update serve.test.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-11-16Make `node:http`.createServer work betterGravatar Jarred Sumner 1-36/+81
2022-11-09Add bun-types, add typechecking, add `child_process` types (#1475)Gravatar Colin McDonnell 1-5/+5
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2022-10-05Temporary hack so `res.socket` in node:http doesn't throwGravatar Jarred Sumner 1-1/+7
2022-08-22woopsGravatar Jarred Sumner 1-1/+0
2022-08-22[node:http] speed up assigning headersGravatar Jarred Sumner 1-55/+41
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}/`); }); ```
2022-08-03use import.meta.require instead of import (#973)Gravatar Zilin Zhu 1-2/+2
2022-07-13add node:http Server polyfill (#572)Gravatar evan 1-0/+540
* node:http polyfill * remove @ts-ignore * reuse emitter instance * requested changes * cleanup Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>