Update README.md to reflect the new way to set up the web dev environment

This commit is contained in:
Sybren A. Stüvel 2022-04-12 12:41:24 +02:00
parent 555c935790
commit b12af4c60e

View File

@ -28,24 +28,22 @@ sudo snap install node --classic --channel=16
This also gives you the Yarn package manager, which can be used to install web dependencies and build the frontend files. This also gives you the Yarn package manager, which can be used to install web dependencies and build the frontend files.
To set up the development environment, follow these steps:
``` ```
# Ensure /usr/local/lib/node_modules exists and is writable by you: cd web/app
sudo mkdir /usr/local/lib/node_modules yarn install
sudo chown youruser /usr/local/lib/node_modules
# Set up the symlinks necessary for development:
cd web/manager-api
npm link
cd ../app
npm link flamenco-manager
npm install
# Run the web frontend:
yarn serve
``` ```
Then run the frontend development server with:
```
yarn run dev --host
```
The `--host` parameter is optional but recommended. The downside is that it
exposes the devserver to others on the network. The upside is that it makes it
easier to detect configuration issues. The generated OpenAPI client defaults to
using `localhost`, and if you're not testing on `localhost` this stands out
more.
## Generating the OpenAPI/Swagger API ## Generating the OpenAPI/Swagger API