Skip to content

Commit

Permalink
Merge pull request #23 from techstartucalgary/feature/redis-session-s…
Browse files Browse the repository at this point in the history
…etup

Feature/redis session setup
  • Loading branch information
Axeloooo authored Nov 24, 2023
2 parents a523699 + 7bdc628 commit 95167d9
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 27 deletions.
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ♻️ Fashion
# ♻️ Fashion App

[![Continuous Integration](https://github.com/techstartucalgary/fashion/actions/workflows/ci.yml/badge.svg)](https://github.com/techstartucalgary/fashion/actions/workflows/ci.yml)

Expand All @@ -16,7 +16,7 @@

- [Lujaina]() - Project Manager
- [Parsa]() - Frontend Developer
- [Morteza]() - Frontend Developer
- [Morteza]() - Full Stack Developer
- [Axel Sanchez](https://github.com/Axeloooo) - Backend Developer
- [Anfaal]() - Backend Developer
- [Ryan]() - Backend Developer
Expand All @@ -27,18 +27,22 @@
- Frontend

![Swift](https://img.shields.io/badge/Swift-F05138.svg?style=for-the-badge&logo=Swift&logoColor=white)
![Xcode](https://img.shields.io/badge/Xcode-1575F9.svg?style=for-the-badge&logo=Xcode&logoColor=white)
![SwiftUI](https://img.shields.io/badge/SwiftUI-2d68f3.svg?style=for-the-badge&logo=Swift&logoColor=black)
![Figma](https://img.shields.io/badge/Figma-F24E1E.svg?style=for-the-badge&logo=Figma&logoColor=white)
![Xcode](https://img.shields.io/badge/Xcode-1575F9.svg?style=for-the-badge&logo=Xcode&logoColor=white)

- Backend

![Typescript](https://img.shields.io/badge/TypeScript-3178C6.svg?style=for-the-badge&logo=TypeScript&logoColor=white)
![Typescript](https://img.shields.io/badge/TypeScript-1575F9.svg?style=for-the-badge&logo=TypeScript&logoColor=white)
![Node.js](https://img.shields.io/badge/Node.js-339933.svg?style=for-the-badge&logo=nodedotjs&logoColor=white)
![Express](https://img.shields.io/badge/Express-000000.svg?style=for-the-badge&logo=Express&logoColor=white)
![OpenAI](https://img.shields.io/badge/OpenAI-412991.svg?style=for-the-badge&logo=OpenAI&logoColor=white)
![Prisma](https://img.shields.io/badge/Prisma-2D3748.svg?style=for-the-badge&logo=Prisma&logoColor=white)
![MySQL](https://img.shields.io/badge/MySQL-4479A1.svg?style=for-the-badge&logo=MySQL&logoColor=white)
![Redis](https://img.shields.io/badge/Redis-DC382D.svg?style=for-the-badge&logo=Redis&logoColor=white)
![OpenAI](https://img.shields.io/badge/OpenAI-00b48c.svg?style=for-the-badge&logo=OpenAI&logoColor=white)

- Database

![Prisma](https://img.shields.io/badge/Prisma-5a67d8.svg?style=for-the-badge&logo=Prisma&logoColor=white)
![MySQL](https://img.shields.io/badge/MySQL-3e6e93.svg?style=for-the-badge&logo=MySQL&logoColor=white)
![Redis](https://img.shields.io/badge/redis-DC382D.svg?style=for-the-badge&logo=redis&logoColor=white)

- Testing

Expand All @@ -47,7 +51,8 @@

- CI/CD

![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style=for-the-badge&logo=GitHub%20Actions&logoColor=white)
![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-000000.svg?style=for-the-badge&logo=GitHub%20Actions&logoColor=white)
![Docker](https://img.shields.io/badge/Docker-2496ED.svg?style=for-the-badge&logo=Docker&logoColor=white)

## 🚀 Backend Documentation

Expand Down Expand Up @@ -79,7 +84,13 @@ cd backend
npm install
```

5. Run `npm run start` to start the server.
5. Run `docker-compose up -d` to start the database.

```bash
docker-compose up -d
```

6. Run `npm run start` to start the server.

```bash
npm run start
Expand All @@ -103,25 +114,31 @@ npm -v

4. If you see the version number of `Node.js` and `npm` then you are good to go. If not, then try to reinstall `Node.js`.

5. Make sure you have `MySQL` installed on your machine. Click [here](https://dev.mysql.com/downloads/mysql/) to download and install MySQL. Make sure you install the latest version.
5. Make sure you have `Docker Desktop` installed on your machine. Click [here](https://www.docker.com/products/docker-desktop) to download and install Docker Desktop. Make sure you install the latest version.

6. Open the terminal and run `mysql --version` to check if `MySQL` is installed.
6. Open the terminal and run `docker -v` to check if `Docker` is installed.

```bash
mysql --version
docker -v
```

7. If you see the version number of `MySQL` then you are good to go. If not, then try to reinstall `MySQL`.
8. In the same terminal run `docker-compose -v` to check if `Docker Compose` is installed.

8. Make sure you have `Redis` installed on your machine. Click [here](https://redis.io/download) to download and install Redis. Make sure you install the latest version.
```bash
docker-compose -v
```

9. If you see the version number of `Docker` and `Docker Compose` then you are good to go. If not, then try to reinstall `Docker Desktop`.

10. Make sure you have `Git` installed on your machine. Click [here](https://git-scm.com/downloads) to download and install Git. Make sure you install the latest version.

9. Open the terminal and run `redis-server --version` to check if `Redis` is installed.
11. Open the terminal and run `git -v` to check if `Git` is installed.

```bash
redis-server --version
git -v
```

10. If you see the version number of `Redis` then you are good to go. If not, then try to reinstall `Redis`.
12. If you see the version number of `Git` then you are good to go. If not, then try to reinstall `Git`.

### 🧪 Testing

Expand Down Expand Up @@ -177,13 +194,19 @@ cd backend
npm install
```

5. Run `npm run start` to start the server.
5. Run `docker-compose up -d` to start the database.

```bash
docker-compose up -d
```

6. Run `npm run dev` to start the development server.

```bash
npm run dev
```

6. Run `npx prisma studio` to open Prisma Studio and view the database schema (Optional).
7. Run `npx prisma studio` to open Prisma Studio and view the database schema (Optional).

```bash
npx prisma studio
Expand Down
20 changes: 20 additions & 0 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3"

services:
mysql:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
ports:
- 3306:3306
volumes:
- mysql:/var/lib/mysql

redis:
image: redis
ports:
- 6379:6379

volumes:
mysql:
Loading

0 comments on commit 95167d9

Please sign in to comment.