generated from nullplatform/technology-templates-any
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c7bb92
commit 6db780f
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`); | ||
}); |