We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy node js to display the out-html docker-compose docker-compose.yml and add server.js to out-html (refs:https://stackoverflow.com/questions/13339695/nodejs-w-express-error-cannot-get )
version: "3" services: node: image: node:16 container_name: gerritstats-3003 hostname: node ports: - "3003:3000" working_dir: /app volumes: - ./out-html:/app command: ["/bin/bash", "-c", "npm add express && node server.js"] restart: always
const express = require('express') const app = express() const port = 3000
app.use(express.static(__dirname)); app.listen(port, () => { console.log(Example app listening at http://localhost:${port}) })
Example app listening at http://localhost:${port}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Deploy node js to display the out-html
docker-compose docker-compose.yml and add server.js to out-html (refs:https://stackoverflow.com/questions/13339695/nodejs-w-express-error-cannot-get )
$ cat docker-compose.yml
version: "3"
services:
node:
image: node:16
container_name: gerritstats-3003
hostname: node
ports:
- "3003:3000"
working_dir: /app
volumes:
- ./out-html:/app
command: ["/bin/bash", "-c", "npm add express && node server.js"]
restart: always
$ cat out-html/server.js
const express = require('express')
const app = express()
const port = 3000
app.use(express.static(__dirname));
app.listen(port, () => {
console.log(
Example app listening at http://localhost:${port}
)})
The text was updated successfully, but these errors were encountered: