https://dine-in-rest.herokuapp.com/docs
Web service for restaurant seating management system.
- a REST service
- a queue service using Redis
- a WebSocket service
There are two ways to start the services of this project:
- Using Docker (recommended)
- Manual Installation
If you already have Docker installed with Docker Compose, you can install and start the services with:
docker-compose --compatibility up -d
This will starts 3 Rest API services with 3 WebSocket servers with Nginx as load-balancer in front of them.
You can shutdown the services with the command
docker-compose down
-
Install the following software if not available in your machine:
- MongoDB
- Redis
-
Install all project dependencies.
yarn install
-
Add a
.env
file at the root of the project with the following contents:RESTAURANT_DB_URL=mongodb://localhost:27017/restaurant PORT=4000 REDIS_URL=redis://localhost:6379 WEBSOCKET_PORT=8080 JWT_SECRET=Y0UR_JWT_S3CR3T
-
Start all the services:
yarn start
- Once the services started, you can explore the available REST endpoints at
<baseUrl>/api
, e.g. http://localhost:4000/api - The Websocket endpoints is available at the port number following
WEBSOCKET_PORT
variable, e.g.ws://localhost:8080
You can run the integration testing between the application of the project with the following command:
yarn test:e2e
You can run end-to-end testing between the applications in a docker containers with:
docker-compose -f docker-compose-test.yaml run e2etest