Skip to content

Commit 0806352

Browse files
committed
change port
1 parent 10a51ef commit 0806352

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use the official Node 8 image.
22
# https://hub.docker.com/_/node
3-
FROM node
3+
FROM node:16.16.0-alpine
44

55
# Create and change to the app directory.
66
WORKDIR /usr/src/app

main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const http = require('http');
22
const Users = require('./users');
33

4-
const host = process.env.HOST || '127.0.0.1'
54
const port = process.env.PORT || 8081
65

76
function handleGetReq(req, res) {
@@ -23,6 +22,6 @@ const server = http.createServer((req, res) => {
2322
}
2423
});
2524

26-
server.listen(port, host, () => {
27-
console.log(`The server start on http://${host}:${port}/`);
25+
server.listen(port, () => {
26+
console.log(`The server start on port ${port}`);
2827
});

0 commit comments

Comments
 (0)