The docker image has health checks enabled by default. They are done via a subcommand that pings the `/healthz` endpoint and fails when it returns a bad value.
You can use the same endpoint to perform health checks manually.
> Important! If you use Docker or Compose, prefer defining the `GOSHORT_HOST` and `GOSHORT_PORT` configs as environment variables instead of command line flags.
> They are used by the healthcheck command to find the address to call, so it's important that they are sync'd between the main process and the healthcheck.
## Building and running from source
You'll need:
- Go 1.21 or greater
- Node 18 or greater
**Install the dependencies with:**
```
make install
```
**Build with:**
```
make all
```
**Start the server with:**
```
./goshort serve
```
## Development
If you want to develop locally, you'll need:
- Go 1.21 or greater
- Node 18 or greater
**Install the dependencies with:**
```
make install
```
**Start the development server with:**
```
make dev
```
This will start the following:
- Frontend dev server at http://localhost:3000
- Backend dev server at http://localhost:8080
Frontend changes are hot-reloaded, but backend changes require a restart.