We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dadb3a commit 0451654Copy full SHA for 0451654
1 file changed
server.f.ts
@@ -1,5 +1,5 @@
1
import { utf8 } from 'functionalscript/text/module.f.js'
2
-import { type Vec } from 'functionalscript/types/bit_vec/module.f.js'
+import { length, type Vec } from 'functionalscript/types/bit_vec/module.f.js'
3
import { pure } from 'functionalscript/types/effects/module.f.js'
4
import {
5
createServer,
@@ -53,6 +53,10 @@ const listener = ({ url }: IncomingMessage) => {
53
body: o ? v : utf8('404 not found'),
54
})
55
56
+ .step(x =>
57
+ log(`served: ${length(x.body) >> 3n} bytes`)
58
+ .step(() => pure(x))
59
+ )
60
}
61
62
const main: NodeProgram = () => createServer(listener)
0 commit comments