This commit is contained in:
asep komarudin 2023-01-15 00:19:37 +07:00
parent e53a643e3d
commit 1ab37bd478
209 changed files with 79957 additions and 0 deletions

View file

@ -0,0 +1,17 @@
const http = require('http')
const fs = require('fs');
const PORT = 7000;
http.createServer(function (request, response) {
if (request.url == '/') {
fs.readFile('./templates/demo.html', function(err, data) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.write(data);
return response.end();
});
}
else{
return response.end('Invalid request');
}
}).listen(PORT);