Skip to content

Instantly share code, notes, and snippets.

@kamiljozwik
Created August 5, 2021 09:59
Show Gist options
  • Save kamiljozwik/b8152f9f7f74b697d2a2af9e34e01744 to your computer and use it in GitHub Desktop.
Save kamiljozwik/b8152f9f7f74b697d2a2af9e34e01744 to your computer and use it in GitHub Desktop.
Node.js docker web app
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}`);
});
{
"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