Hi, I'm new to using Code Deploy. I am trying to run a node application. I have setup.sh, start.sh and app.js in the root directory.
This is my appspec.yml file
version: 0.0
os: linux
files:
- source: /
destination: /
hooks:
Install:
- location: setup.sh
timeout: 3600
ApplicationStart:
- location: start.sh
timeout: 3600
setup.sh
yum -y install nodejs npm
npm install
start.sh
node /app.js
app.js (just a basic dummy server)
var express = require("express");
var app = express();
app.get("/",function(req,res) {
res.send("Hello world")
})
var server = app.listen(8080,function() {
console.log("Listening at " + server.address().address + ": " + server.address().port);
});
The installation step completed successfully, but Code Deploy is stuck waiting for it to complete the ApplicationStart step.
I am sure of this because the app.js program is running continuously, so how should CodeDeploy know that it is working and moving on?
source
share