IP_Zhelovanov/front/index.js

12 lines
282 B
JavaScript
Raw Permalink Normal View History

2023-02-20 22:25:28 +04:00
const fs = require('fs')
const http = require('http')
const requestListener = async function (req, res) {
res.writeHead(200);
fs.readFile('index.html', (err, data) => {
res.end(data);
});
};
const server = http.createServer(requestListener)
server.listen(5050)