Skip to content

Commit

Permalink
Fix webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
pablovilas committed Apr 9, 2024
1 parent 2c7bb92 commit 6db780f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { createServer } = require('node:http');
const http = require('http');
const hostname = '0.0.0.0';
const port = 8080;

const server = createServer((req, res) => {
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end('{ "status": "ok" }');
});

server.listen(port, hostname, () => {
console.log(`Listening on ${hostname}:${port}`);
console.log(`Server is running on port ${port}`);
});

0 comments on commit 6db780f

Please sign in to comment.