summaryrefslogtreecommitdiff
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-03-18tests/js/hero.mjs: Fix function orderingEuAndreh1-67/+67
2024-03-18src/hero.mjs: Add statusMessage() and statusResponse()EuAndreh2-20/+56
2024-03-17src/hero.mjs: Log to stdout instead of stderrEuAndreh2-4/+4
The first question that this brings is: Is the output of the program useful for a downstream process? Is this logging an *output* of the program? But in this case, the answer is: yes, for both questions. A downstream program could very well be fed the output of the program via a pipe and process it, as the data being emitted is meant to be ingested. So instead of following the default "warnings ought to go to stderr" model, we acknowledge that the data is actually an *out*put, and send it to std*out*.
2024-03-17tests/js/hero.mjs: Add simple test for now()EuAndreh2-1/+13
2024-03-17src/hero.mjs: Use name of CWD as the default name of buildServer()EuAndreh2-6/+19
2024-03-17tests/js/hero.mjs: Accept a `headers` optional argument in socketRequest()EuAndreh1-1/+2
2024-03-17src/hero.mjs: Add "stopping-server" logEuAndreh1-0/+11
2024-03-17src/web.mjs: Move the "starting-server" logging into hero when .listen()EuAndreh2-12/+15
2024-03-17src/hero.mjs: Include "timestamp" in the logged data objectsEuAndreh2-29/+51
2024-03-16src/hero.mjs: Explicitly inject "headers" key in reqEuAndreh1-0/+2
2024-03-16src/hero.mjs: Add makeUpgradeListener() (again, now rewritten)EuAndreh2-0/+92
2024-03-16src/hero.mjs: use empty object as default value for renderHeaders()EuAndreh2-1/+2
2024-03-16src/hero.mjs: validateUpgrade(): Add note on 405 caseEuAndreh1-0/+3
2024-03-16src/web.mjs: Add "WEBSOCKET" routeEuAndreh1-7/+8
2024-03-16src/hero.mjs: Move interceptors.contentType() closer to the end of the listEuAndreh1-1/+1
2024-03-16tests/js/hero.mjs: Add upgrade case to handleRequest() testEuAndreh1-2/+35
2024-03-16src/hero.mjs: Add writeHead() and its helper functionsEuAndreh2-0/+93
2024-03-16src/hero.mjs: Remove current makeUpgradeListener() and its helpersEuAndreh2-233/+0
2024-03-16src/hero.mjs: findHandler(): learn how to find upgrade routesEuAndreh2-32/+73
2024-03-16src/hero.mjs: Add interceptors.websocketHandshake()EuAndreh2-2/+95
2024-03-16src/hero.mjs: Remove WEBSOCKET_* constantsEuAndreh1-9/+3
2024-03-16src/hero.mjs: Add validateUpgrade(), computeHash() and their helper functionsEuAndreh2-2/+268
2024-03-16src/hero.mjs: Add "upgrade" and "socket" keys to `req`EuAndreh2-13/+29
Also log on "in-request" the value of "upgrade".
2024-03-16src/hero.mjs: interceptors.contentType(): Generate body from status when missingEuAndreh2-13/+44
2024-03-15src/hero.mjs: Include stacktrace in 500 log entryEuAndreh2-2/+5
2024-03-15src/hero.mjs: Add makeUpgradeListener()EuAndreh2-0/+80
2024-03-15src/hero.mjs: Add handlerForConnection()EuAndreh2-0/+56
2024-03-15src/hero.mjs: Add support for "WEBSOCKET" type of routeEuAndreh2-2/+12
2024-03-15src/hero.mjs: Add buildHttpPayload()EuAndreh2-0/+67
2024-03-15src/hero.mjs: Add emitHeaders()EuAndreh2-0/+30
2024-03-15src/hero.mjs: Add comboForLabel()EuAndreh2-0/+25
2024-03-15src/hero.mjs: Add isValidLabel()EuAndreh2-0/+28
2024-03-15src/hero.mjs: Destructure handler arguments in handleRequest()EuAndreh1-4/+4
2024-03-14tests/lighttpd.conf: add the upgrade header without replacing existing onesEuAndreh1-1/+1
2024-03-14Makefile: Use TCP port 6001EuAndreh1-1/+1
2024-03-14tests/lighttpd.conf: Forward "enable" header to allow connection upgradeEuAndreh1-0/+3
2024-03-14src/hero.mjs: Include "headers" and "ref" in request paramEuAndreh2-11/+55
2024-03-14Makefile: Add "run-binder" to expose lighttpd's unix socket to a TCP portEuAndreh1-1/+7
2024-03-14src/web.mjs: Add trailing newline to bodyEuAndreh1-2/+2
2024-03-08src/hero.mjs: Add timing data to "in-response" log entryEuAndreh2-2/+14
2024-03-08src/utils.mjs: Add dissoc()EuAndreh2-0/+24
2024-03-08src/web.mjs: Move logging and interceptors to the beginning of the fileEuAndreh2-595/+595
2024-03-08src/hero.mjs: Make sure globalInceptors are used even when we get a 404EuAndreh2-8/+30
2024-03-08src/hero.mjs: Add buildTable()EuAndreh2-1/+21
2024-03-07src/hero.mjs: server.listen() -> server.start(); server.close() -> server.stop()EuAndreh3-7/+7
2024-03-07src/hero.mjs: Add makeReopeningPipeReader()EuAndreh2-29/+130
This addresses point nÂș 2 from commit 40118a188fb05219d1188ff775ce71f66c8cb56a.
2024-03-07src/hero.mjs: makePipeReader() now returns a function for closing itEuAndreh2-21/+23
2024-03-07tests/js/hero.mjs: Better names for pipes and sockets created by testsEuAndreh2-22/+29
2024-03-07rm -rf tools/EuAndreh3-319/+0
2024-03-06src/hero.mjs: Better handling of default values for argumentsEuAndreh1-20/+10
Now one can give a partial specification of the object and still get the other attributes to have their default values.