https://github.com/guoyunhe/aws-metro-app
https://github.com/guoyunhe/aws-metro-app
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/guoyunhe/aws-metro-app
- Owner: guoyunhe
- Created: 2022-10-16T13:46:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-29T01:50:51.000Z (over 2 years ago)
- Last Synced: 2025-01-10T17:40:07.818Z (5 months ago)
- Language: TypeScript
- Size: 666 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Front-end App
## System Requirements
- Node.js 16+ (with NPM)
## Local Development
```
npm install
npm start
```Visit http://localhost:3000/ in your web browser
## AWS Deployment
Create a new Amplify app and deployment of main branch.
Add the following environment variables:
```ini
REACT_APP_API_BASE_URL=https://aws-metro-api.guoyunhe.me/
```Modify the build spec (amplify.yml):
```yml
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- echo "REACT_APP_API_BASE_URL=$REACT_APP_API_BASE_URL" >> .env
- npm run build
artifacts:
baseDirectory: build
files:
- "**/*"
cache:
paths:
- node_modules/**/*
```