User Services API
- After clone the project
- Install dependency by running
npm install- Run the app
npm run dev- set
EXECUTABLE_PHPenvironment variable in.envfile. you can runwhich phpin your console to find it
EXECUTABLE_PHP=/path/to/bin/php
- set
LARAVEL_PATHenvironment variable in.envfile. need to set fullpath to your laravel project that contain migration
LARAVEL_PATH=/path/to/laravel
- you need to create database named "testing" in your Postgresdb
- open
.env.testfile. If you don't have this.env.testfile, copy paste from.env - Change these value in
.env.test
DB_HOST=localhost
DB_NAME=testing
DB_PASSWORD=<your-postgresql-password>
DB_USERNAME=<your-postgresql-username>
// Add this value if you copy from .env file
DB_SSL=false
- To run api (integration) testing
npm run test:api- make sure you already have
.envfile (can see the.env.examplefor some connection to docker services)
- Docker
- Docker compose
- user-api (this repository)
- mongodb
- redis
- postgresql
- elasticsearch v7 (compatible with searchly.com)
- docker network
bettersocial-devnetwork(to let queue repository docker-compose connected)
- Start docker-compose
docker-compose up -d- getting into
user-apibash console
docker-compose exec user-api bash