# Starting the Server

To start the server, use the following command:

```bash
export PYTHONPATH=./
nohup python ./src/start_server.py --config_path ./configs/assignments/debug.yaml > outputs/start_server.log 2>&1 &
```

This command will run the server in the background and redirect the output to `outputs/start_server.log`.

If you only want to debug the server, use the following command:

```bash
export PYTHONPATH=./
python ./src/start_server.py --config_path ./configs/assignments/debug.yaml
```

## Command Explanation

- `export PYTHONPATH=./`: Sets the `PYTHONPATH` to the current directory.
- `nohup`: Prevents the command from being terminated when the terminal is closed.
- `python ./src/start_server.py`: Executes the Python script to start the server.
- `--config_path ./configs/assignments/debug.yaml`: Specifies the path to the configuration file. The server will listen to the ports defined in this file.
- `> outputs/start_server.log 2>&1 &`: Redirects both standard output and standard error to `outputs/start_server.log` and runs the command in the background.

## Testing the Server

To test if the server is running correctly, you can use the following `curl` commands:

```bash
curl -X POST -H "Content-Type: application/json" -d '{"hello":"world"}' http://192.168.100.1:8000/api/ping
curl -X POST -H "Content-Type: application/json" -d '{"hello":"world"}' http://192.168.100.1:8001/api/ping
```

These commands send POST requests to the server endpoints to verify their functionality.

## Additional Notes

- Ensure that the configuration file path provided in the `--config_path` argument is correct.
- Monitor the `outputs/start_server.log` file for any errors or logs generated by the server.
