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.
- Host: GitHub
- URL: https://github.com/ariessa/swipa-backend
- Owner: ariessa
- Created: 2024-05-10T14:45:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T15:15:06.000Z (about 2 years ago)
- Last Synced: 2025-01-09T02:56:09.656Z (over 1 year ago)
- Topics: docker, docker-compose, express-js, javascript, jest, tdd-javascript
- Language: JavaScript
- Homepage:
- Size: 407 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 ;
```