We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10a51ef commit 0806352Copy full SHA for 0806352
docker/Dockerfile
@@ -1,6 +1,6 @@
1
# Use the official Node 8 image.
2
# https://hub.docker.com/_/node
3
-FROM node
+FROM node:16.16.0-alpine
4
5
# Create and change to the app directory.
6
WORKDIR /usr/src/app
main.js
@@ -1,7 +1,6 @@
const http = require('http');
const Users = require('./users');
-const host = process.env.HOST || '127.0.0.1'
const port = process.env.PORT || 8081
7
function handleGetReq(req, res) {
@@ -23,6 +22,6 @@ const server = http.createServer((req, res) => {
23
22
}
24
});
25
26
-server.listen(port, host, () => {
27
- console.log(`The server start on http://${host}:${port}/`);
+server.listen(port, () => {
+ console.log(`The server start on port ${port}`);
28
0 commit comments