This commit is contained in:
Green! 2022-05-17 13:39:00 -04:00 committed by GitHub
parent de3432c9fc
commit 9745ab2833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +0,0 @@
import Server from 'bare-server-node';
import http from 'http';
import nodeStatic from 'node-static';
const bare = new Server('/bare/', '');
const serve = new nodeStatic.Server('static/');
const server = http.createServer();
server.on('request', (request, response) => {
if (bare.route_request(request, response))
return true;
serve.serve(request, response);
});
server.on('upgrade', (req, socket, head) => {
if (bare.route_upgrade(req, socket, head))
return;
socket.end();
});
server.listen(8080);