# Super simple API-based stock terminal

Run the backend with

```bash
uvicorn retailtwin.api.main:app
```

Use Caddy to reverse proxy and the following Caddyfile. Paths are static so you have to run caddy from the root of the package

```
:80 {
    handle_path /api/v1/* {
        reverse_proxy localhost:8000
    }
    file_server {
        root src/retailtwin/api/static
    }
}
```

If you execute

```bash
caddy run -c Caddyfile
```

You should be able to browse the application at http://127.0.0.1, and reach the api docs at http://127.0.0.1/api/v1/docs

Caddy can be installed in Windows with Chocolatey