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
var express = require("express"); | |
var app = express(); | |
app.use(express.json()) | |
app.get("/", (req, res, next) => { | |
res.json({message: "Hello World"}); | |
}); | |
app.listen(3000, () => { | |
console.log("Server running on port 3000"); | |
}); |
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
FROM node | |
ADD index.js package.json /app/ | |
WORKDIR /app | |
RUN npm install | |
EXPOSE 3000 | |
ENTRYPOINT ["node","index.js"] |
OlderNewer