Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get buildspec.yml file for react app

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 12
   
    commands:
        # install npm
        - npm install
       
  build:
    commands:
        # run build script
        - npm run-script build
     
artifacts:
  # include all files required to run application
  # notably excluded is node_modules, as this will cause overwrite error on deploy
  files:
    - public/**/*
    - src/**/*
    - package.json
    - appspec.yml
    - scripts/**/*
Source by ncoughlin.com #
 
PREVIOUS NEXT
Tagged: #file #react #app
ADD COMMENT
Topic
Name
5+7 =