Skip to content

Instantly share code, notes, and snippets.

@rahulrsingh09
Created December 21, 2021 08:25
Show Gist options
  • Save rahulrsingh09/db3a68ff97d324801b889b82242f0554 to your computer and use it in GitHub Desktop.
Save rahulrsingh09/db3a68ff97d324801b889b82242f0554 to your computer and use it in GitHub Desktop.
AWS Bean Stalk Deployment for Node and TS
dist.sh
# If the directory, `dist`, doesn't exist, create `dist`
stat dist || mkdir dist
# Archive artifacts
zip dist/$npm_package_name.zip -r dist package.json package-lock.json
package.json
"scripts": {
"build": "tsc",
"dist": "sh ./scripts/dist.sh",
"trigger": "node dist/server.js",
"start" : "npm install && npm run build && npm run dist && npm run trigger"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment