This guide contains the development environment setup for Fonoster. It includes the API Server and supporting infrastructure.
Prerequisites
- Docker and Docker Compose
- NodeJS >= v20
- Git (Optional)
Hacking the Backend
To start hacking the backend, start by cloning the project, and copying the .env.example.dev and ./config/integrations.example.json
Here is an example:
In the .env file you will need to find and update the following variables. All variables will need to be updated to a routable IP within your local environment.
With ifconfig | grep "en0" -A 5 on Linux or Mac you will see a good candidate to use as the IP.
Next, you need to install and build the project.
Then, you need to start the infrastructure and initialize the database using the following commands:
The previous command will start all the services including envoy, mailhog, adminer, influxdb, postgres, and asterisk.
Finally, start the API Server with:
Running the Integration Tests
A good indicator that your environment is correctly setup is having ALL passing in your integration tests. Run the integration test, on a separate terminal, with the following command: