This server is designed to handle sites built with BrowserRouter.
- Build your React project
react-scripts build
and copy it to/web/
- Test on localhost
- Run
dev_appserver.py app.yaml
in the same directory as theapp.yaml
file - Open browser and navigate to http://localhost:8080
- Run
- Deploy to Google App Engine
- Run
gcloud app deploy
in the same directory as theapp.yaml
file
- Run
During your react build, any folder in /public/
will create it's own static directory. These folders need
to be added to the staticPaths array.
- Open
main.go
in a text editor - Add elements to the
staticPaths
string array
Example
staticPaths := [...]string{"/static/", "/img/", "/media/"}