Build a React App in Elastic Beanstalk

后端 未结 1 1913
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-13 05:43

I followed these instructions and I made a hello world app with React. I uploaded the development files in my EBS and it worked.

After that I used the command np

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-13 06:11

    I recently deployed my react node based app using the EB CLI. I had to run eb init in my project directory which walks you through setting up the eb config. Here's the steps:

    1. npm init to setup package.json (which you've done)
    2. git init to setup a git repo
    3. eb init to setup elastic beanstalk settings through its CLI
    4. commit code
    5. deploy to eb with eb deploy

    AWS walks you through these steps assuming you're serving your app with node (which you didn't say, but it's likely).

    As a bonus, you might want to setup CI so that AWS builds your app when your tests pass on code push. See the travis yaml file I use to do this.

    0 讨论(0)
提交回复
热议问题