Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -1,14 +1,15 @@
'use strict'
const http = require('http')
const http = require('node:http')
const send = require('..')
const path = require('path')
const path = require('node:path')
const indexPath = path.join(__dirname, 'index.html')
const server = http.createServer(function onRequest (req, res) {
send(req, indexPath)
.pipe(res)
const server = http.createServer(async function onRequest (req, res) {
const { statusCode, headers, stream } = await send(req, indexPath)
res.writeHead(statusCode, headers)
stream.pipe(res)
})
server.listen(3000)