Add instructions for developing the client and server at the same time

This commit is contained in:
Jordan Eldredge 2022-09-21 20:09:32 -07:00
parent 7a687f5fc6
commit b7f7571b8d

View File

@ -12,6 +12,22 @@ yarn build-webamp
yarn start
```
By default the client will connect to the production API. This works great for client-only changes. If you need to make changes which span both the client and the server, you will need to make some changes.
Start the server locally:
```bash
cd pacakges/skin-database
yarn
yarn start
```
This should start the server on port 3001.
Now update the `API_URL` constant in `src/constants.js` to `"http://localhost:3001"`. This will tell the client to connect to the local server instead of the production API.
Finally, in a separate terminal, start the client as outlined at the top of this section.
## Deployment
The Skin Museum client is deployed using Netlify. See the `netlify.toml` file in this same directory for details about how that works. The Netlify site is configured to use this subdirectory as it's base directory.