Deploy React and Node project to Elastic Beanstalk
Sources:
AMS Official docs
How to Log
Very good source with sample project
Extra source
Important Points
tail -n 50 /var/log/web.stdout.logprints last 50 lines of node terminal outputtail -n 50 eb-engine.loglogs errors before node is startedeb createcreates environmenteb initinitialize an application. Multiple applications can run in one environment..ebignoreignore files when type ineb deploy
1 | if (process.env.NODE_ENV !== 'development') { |
super important!!! It will run react build folder at nodejs’s port. (8080 or 5000)
Steps
- build a react build with
npm run buildunder the react folder (my-app) eb createcode .ebignoreto create ignore file- ignore all the files that mentioned before
eb deploy
赞赏一下
支付宝打赏
微信打赏