Open chendelin1982 opened 3 weeks ago
need to condition:
npm install express --save
if [ ! -f app.js ]; then
cat > app.js <<EOF
const express = require('express')
const app = express()
const port = 8080
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(\`Example app listening on port \${port}\`)
})
EOF
echo "app.js has been created."
else
echo "app.js already exists."
fi
node app.js
What type of your feature request?
when runtime restart, cmd.sh execute again