Created
August 5, 2021 09:59
-
-
Save kamiljozwik/b8152f9f7f74b697d2a2af9e34e01744 to your computer and use it in GitHub Desktop.
Node.js docker web app
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
import express from "express"; | |
const app = express(); | |
const port = 8080; | |
app.get("/", (req, res) => { | |
res.send("Cześć świecie 👋"); | |
}); | |
app.listen(port, () => { | |
console.log(`Listening on port ${port}`); | |
}); |
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
{ | |
"name": "dockerwebapp", | |
"version": "1.0.0", | |
"description": "Simple web app", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"type": "module", | |
"author": "kamil@frontstack.pl", | |
"license": "MIT", | |
"dependencies": { | |
"express": "^4.17.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment