npm install
- Create
.env.local
with any necessary overrides of.env
to match your environment. npm run build
- Move/symlink/whatevs the contents of the
build
directory to their destination
A sample .env.local
file might be:
REACT_APP_API_URL=http://url/of/api
PUBLIC_URL=/path/to/build/dir/from/web/root
And a sample build script (i.e. the one I use) might look like
#!/usr/bin/env bash
npm install
npm run build
ln -s ~/shared-logs/api build/api