I was setting up a Codepipeline for my GIT repository when I was new to AWS. My backend is PHP and my frontend is React. In order to use php as the backend, I first established an elastic beanstalk environment. Then I built my code using AWS code build, and at the end, I made a code pipeline.
The problem is that all I can see in the pipeline when I try to access it is php. Frontend for React is not loading.
I initially assumed that perhaps my React code was not being built, so I made a small tweak to it and received an update in AWS CodeBuild. So, I suppose that is not the issue.
If anyone requires any additional information, kindly let me know so that I may amend my query.
This is the yaml file I use.
version: 0.2
phases:
install:
# runtime-versions:
# nodejs: 14.11.0
commands:
# - echo installing node 16
# - curl -sL https://deb.nodesource.com/setup_16.x | bash
# - apt install -y nodejs
# - echo installing Yarn...
# - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
# - echo "curl -sS https://dl.yarnpkg.com/debian/ stable main"
# - apt install --no-install-recommends yarn
pre_build:
commands:
- echo Installing source NPM dependencies...
- npm install
build:
commands:
- echo Testing ...
# yarn test
- echo Building ...
- npm run build
post_build:
commands:
- echo Build completed on `date`
# Include only the files required for your application to run.
artifacts:
files:
- "**/*"
base-directory : 'build'
# - config.js
# - index.js
# - reset.js
# - package.json
# - node_modules/**/*