An open API service indexing awesome lists of open source software.

https://github.com/ariessa/swipa-backend

The backend part of Swipa, a dating app. Built using Express.
https://github.com/ariessa/swipa-backend

docker docker-compose express-js javascript jest tdd-javascript

Last synced: 2 months ago
JSON representation

The backend part of Swipa, a dating app. Built using Express.

Awesome Lists containing this project

README

          

Swipa Backend


❤️ Swipa Backend is the backend part of Swipa, a dating app.


## Entity Relationship Diagram



## Prerequisites
All installation instructions are geared for macOS Apple Silicon system. By default, all UNIX-based and Linux-based system are already installed with `make`.

For Windows system, `make` can be installed using 3 ways:

- Using Make for Windows
- Using `chocolatey` to install make
- Using Windows Subsystem for Linux (WSL2)


## How to run it locally

- Clone repository

```
git clone git@github.com:ariessa/swipa-backend.git
```

- Create `.env` file and insert values

```
BACKEND_PORT=""
POSTGRES_HOST=""
POSTGRES_PORT=""
POSTGRES_DATABASE=""
POSTGRES_USER="postgres"
POSTGRES_PASSWORD=""
FRONTEND_DEV_URL=""
```

- Build and start all Docker containers

```
make up
```


## How to run the tests

- Get a list of unit tests and their verbose results

```
make tests
```



- Get test coverage

```
make tests-coverage
```




## Useful Commands

- Run SQL query inside containerised PostgreSQL database

```
# Start a Bash shell inside Docker container 'swipa-database'
docker exec -it swipa-database /bin/bash

# Switch the user to the 'postgres' user within the Docker container
su - postgres

# Open PostgreSQL CLI
psql

# Connect to database 'swipa'
\c swipa

# Run query
# Example: select * from users;
select from ;
```