mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
8916de76be
## What This PR removes or updates references in the docs to Heroku. Most of the code samples have been replaced with a more generic `unleash.example.com` url, while other references have been removed or updated. Also removes old OpenAPI files that are out of date and redundant with the new generation. ## Background Come November and Heroku will no longer offer free deployments of Unleash, so it's about time we remove that claim. Links to the heroku instance are also outdated because we don't have that instance running anymore. Finally, the OpenAPI files we do have there are old and static, so they don't match the current reality. ## Commits * Meta: update ignore file to ignore autogenerated docs I must've missed the ignore file when looking for patterns. * docs: delete old openapi file. This seems to have been a holdover from 2020 and is probably hand-written. It has been superseded by the new autogenerated OpenAPI docs. * docs: add notes for heroku changes to the frontend readme and pkg * docs: remove old openapi article and add redirects to new openapi * docs: fix link in overview doc: point to GitHub instead of heroku * docs: update quickstart docs with new heroku details * docs: remove reference to crashing heroku instance * docs: remove references to herokuapp in code samples * docs: add a placeholder comment * docs: update references for heroku updates * docs: keep using unleash4 for enterprise * docs: remove start:heroku script in favor of start:sandbox * docs: remove 'deploy on heroku button' Now that it's not free anymore (or won't be very shortly), let's remove it. * docs: remove extra newline
69 lines
1.7 KiB
Markdown
69 lines
1.7 KiB
Markdown
# frontend
|
|
|
|
This directory contains the Unleash Admin UI frontend app.
|
|
|
|
## Run with a local instance of the unleash-api
|
|
|
|
First, start the unleash-api backend on port 4242.
|
|
Then, start the frontend dev server:
|
|
|
|
```
|
|
cd ~/frontend
|
|
yarn install
|
|
yarn run start
|
|
```
|
|
|
|
## Run with a sandbox instance of the Unleash API
|
|
|
|
Alternatively, instead of running unleash-api on localhost, you can use a remote instance:
|
|
|
|
```
|
|
cd ~/frontend
|
|
yarn install
|
|
yarn run start:sandbox
|
|
```
|
|
|
|
## Running end-to-end tests
|
|
|
|
We have a set of Cypress tests that run on the build before a PR can be merged
|
|
so it's important that you check these yourself before submitting a PR.
|
|
On the server the tests will run against the deployed Heroku app so this is what you probably want to test against:
|
|
|
|
```
|
|
yarn run start:sandbox
|
|
```
|
|
|
|
In a different shell, you can run the tests themselves:
|
|
|
|
```
|
|
yarn run e2e:heroku
|
|
```
|
|
|
|
If you need to test against patches against a local server instance,
|
|
you'll need to run that, and then run the end to end tests using:
|
|
|
|
```
|
|
yarn run e2e
|
|
```
|
|
|
|
You may also need to test that a feature works against the enterprise version of unleash.
|
|
Assuming the Heroku instance is still running, this can be done by:
|
|
|
|
```
|
|
yarn run start:enterprise
|
|
yarn run e2e
|
|
```
|
|
|
|
## Generating the OpenAPI client
|
|
|
|
The frontend uses an OpenAPI client generated from the backend's OpenAPI spec.
|
|
Whenever there are changes to the backend API, the client should be regenerated:
|
|
|
|
```
|
|
./scripts/generate-openapi.sh
|
|
```
|
|
|
|
This script assumes that you have a running instance of the enterprise backend at `http://localhost:4242`.
|
|
The new OpenAPI client will be generated from the runtime schema of this instance.
|
|
The target URL can be changed by setting the `UNLEASH_OPENAPI_URL` env var.
|