
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
codedeploy-scripts
Advanced tools
AWS CodeDeploy lifecycle scripts using ES6 to deploy a node app to EC2.
npm install codedeploy-scripts
In the app folder, you only need two simple files to handle the deployment.
###appspec.yml
This tells CodeDeploy to copy everything to /apps/appname and run deployment.js for all lifecycle events. ApplicationStop is omitted, but you can use it if you are extremely confident in the quality of your code, or just enjoy manually fixing broken servers.
version: 0.0
os: linux
files:
+ source: /
destination: /apps/appname
hooks:
# ApplicationStop:
# - location: deployment.js
# timeout: 180
BeforeInstall:
+ location: deployment.js
timeout: 180
AfterInstall:
+ location: deployment.js
timeout: 180
ApplicationStart:
+ location: deployment.js
timeout: 180
ValidateService:
+ location: deployment.js
timeout: 180
Extends the deployment class with any custom actions needed on CodeDeploy lifecycle events. Deployment.run() will call the appropriate method based on the LIFECYCLE_EVENT variable set by CodeDeploy.
The below code will run /apps/deploytest/server.js on port 5000, with nginx as a reverse proxy and serving static files on deploytest.example.com:80
#!/usr/local/bin/node
var SimpleDeployment = require("codedeploy-scripts").SimpleDeployment;
var deployment = new SimpleDeployment({
appName: "deploytest",
nodePort: "5000",
serverScript: "server.js",
domains: "deploytest.example.com",
buildFolder: "build",
staticFolder: "static"
});
deployment.run();
For more complex scenarios, just create a custom subclass based on the implementation of SimpleDeployment.
To keep things simple, the code makes a few assumptions.
FAQs
AWS CodeDeploy lifecycle scripts using ES6 to deploy a node app to EC2
The npm package codedeploy-scripts receives a total of 11 weekly downloads. As such, codedeploy-scripts popularity was classified as not popular.
We found that codedeploy-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.