To run the api locally, follow these steps:-
Create a file scripts/set-env.sh following the example file provided and replace 'xxx' with confidential values:
export API_DATABASE_NAME=social-connect
export API_DATABASE_USER=xxx
export API_DATABASE_PASSWORD=xxx
export API_DATABASE_PORT=5432
export API_REDIS_PORT=6379
export PGADMIN_EMAIL=xxx
export PGADMIN_PASSWORD=xxxSet necessary environment variables by executing the script:
. scripts/set-env.shGet the docker containers up for dependent services e.g postgres, redis, .. by running:
docker compose up -dOpen up terminal from root dir & run:
go run api/main.goTo run all tests in the project, run from root dir:
go test ./...