https://github.com/codeluminary/pern-stack-based-ecommerce
This is a basic e-commerce implementation using React, node and postgre
https://github.com/codeluminary/pern-stack-based-ecommerce
expressjs jest-tests nodejs postgresql react reactjs redux reduxtoolkit test-driven-development
Last synced: 11 months ago
JSON representation
This is a basic e-commerce implementation using React, node and postgre
- Host: GitHub
- URL: https://github.com/codeluminary/pern-stack-based-ecommerce
- Owner: CodeLuminary
- Created: 2021-10-29T22:34:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-10T20:41:07.000Z (almost 4 years ago)
- Last Synced: 2023-03-07T08:56:49.745Z (almost 3 years ago)
- Topics: expressjs, jest-tests, nodejs, postgresql, react, reactjs, redux, reduxtoolkit, test-driven-development
- Language: JavaScript
- Homepage:
- Size: 3.04 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ecommerce website using Postgre, express, react and Node
## Start Development
Kindly fork and clone the repo
## Installation
### FRONTEND INSTALLATION
cd or navigate to the frontend folder in your terminal and enter the following command
```
npm install
```
### BACKEND INSTALLATION
cd or navigate to the backend folder in your terminal and enter the following command
```
npm install
```
## Setup
Create a .env file in the root directory of the backend folder and add the following properties
```markdown
PORT=?
DB_PORT = ?
DB_USER = ?
DB_HOST = ?
DB_DATABASE = ?
DB_PASSWORD = ?
#Set timezone, put 1 if it's GMT+1 or -1 if it's GMT-1
TIME_ZONE = ?
SKIP_PREFLIGHT_CHECK=true
# You can set frontend url to any other url
FRONT_END_URL=http://localhost:3000
```
## STARTING PROJECT
### STARTING FRONTEND PROJECT
cd to the frontend folder in your terminal and enter the following command
```
npm start
```
You can access the project in your browser by entering - `localhost:3000`
#### To set homepage to show products from local backend:
change the value of REACT_APP_PRODUCT_URL & REACT_APP_DOMAIN_URL in the .env file inside the frontend folder to your local backend url
```
REACT_APP_PRODUCT_URL=https://fakestoreapi.com/products
REACT_APP_BACKEND_URL=http://localhost:5000
```
### STARTING BACKEND PROJECT
cd to the backend folder in your terminal and enter the following command
```
#This is to run all test and make sure database connection is working and tables are created
#See test folder inside the backend folder for more info.
npm run test
```
```
npm start
```
## 🎩 Author
- IJONI VICTOR 😁😁😁
> Don't forget to star the project 😁😁 . Thanks