Skip to content

Commit

Permalink
fix wrong port in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Conradowatz committed Jan 19, 2024
1 parent 0d24e72 commit c375236
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { IAnvilJob, IAnvilWorker, IReport, ITestRun } from './lib/data_type
import metaDataString from "@/assets/metadata.json";

export module AnvilApi {
const baseUrl = "http://localhost:5001/api/v2/";
const baseUrl = import.meta.env.DEV ? "http://localhost:5001/api/v2/" : "/api/v2/";

export function getIdentifiers(): Promise<string[]> {
return getApiObject("reportIdentifiers");
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Anvil Web comes with a compose file, that has the web ui, mongodb and a TLS-Anvi
```
docker compose up -d
```
After starting, the web interface is acessible via http://localhost:5000/
After starting, the web interface is acessible via http://localhost:5001/

### Docker
Anvil Web needs a mongodb database to run.
Expand All @@ -46,15 +46,15 @@ docker run --network tlsanvil mongo
```
To start anvil web using docker you can then run
```
docker run -network tlsanvil -e PRODUCTION=1 -p 5000:5000 anvil-web
docker run -network tlsanvil -e PRODUCTION=1 -p 5001:5001 anvil-web
```
After starting, the web interface is acessible via http://localhost:5000/
After starting, the web interface is acessible via http://localhost:5001/
The backend runs on the same port.

### Manually / Development environment
Starting the app manually will need a mongo db instance running.
You can start the frontend and backend seperatly. The backend is started by running `npm run start`, but only if you built it beforehand. The frontend is started in develpment mode using `npm run dev`.
The backend is started on port 5000 per default. The frontend will run on port 5173.
The backend is started on port 5001 per default. The frontend will run on port 5173.

### Adding a worker client
To add a worker client connected to the backend, you can run your anvil project in worker mode. As an example, here is how you would start TLS-Anvil:
Expand Down

0 comments on commit c375236

Please sign in to comment.