amazon web services - what's in a node.js elastic beanstalk zip file and how do I get it to run a script on deploy? -


should zip file of application include node_modules folder? should zipping top-level folder contains application files or should not include top root folder instructions amazon lambda?

do have set web application port environment variable in heroku? app start calling npm start , looking @ package.json or have have file called server.js in opsworks?

how can have run small migration script before starts - can put in npm start?

can run npm install on deployment rather copying on node_modules folders?

quick answers:

  1. no, zip file not need include node_modules folder. eb run npm install you.
  2. there several ways run script @ start. npm start one, can run custom commands.
  3. yes, eb run npm start, see configuration options node.js

the best answer take @ 1 of amazon's sample apps, such nodejs-example-express deploying express application elastic beanstalk.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -