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

https://github.com/kbrdn1/myhackount

This is my first MERN project. It is a social network made with Nodes.js to create an API with MongoDB and Express then React.js to create the interface of the app.
https://github.com/kbrdn1/myhackount

crud express expressjs jwt mern-stack mongodb mongoose nodejs react redux sass social-network

Last synced: 3 months ago
JSON representation

This is my first MERN project. It is a social network made with Nodes.js to create an API with MongoDB and Express then React.js to create the interface of the app.

Awesome Lists containing this project

README

          

# MyHackount - MERN Project
img

## Introduction

This is my first MERN project. It is a social network made with Nodes.js to create an API with MongoDB and Express then React.js to create the interface of the app.

## Technologies used within this project
### Backend:
- NodeJS
- MongoDB
- Express
- JWT

### Frontend
- ReactJS
- SASS
- Redux

## Project setup
### Backend:
#### Environment variable
```sh
# ./config/.env
PORT= # enter the API port (by default is 5000)
APP_URL=http://localhost:3000
DB_USER_PASS=:
TOKEN_SECRET= # enter a random secret token (exemple: "63e45d11c84d424")
```
#### Connect database
```javascript
// ./config/db.js
/*
add your path URL to connect at your Mongo DataBase
for exemple :
*/
"mongodb+srv://" + process.env.DB_USER_PASS +"@cluster0.t023j84.mongodb.net/{dbname}"
// or
"mongodb://localhost:27017/{dbname}"
```
### Frontend
#### Environment variable
```sh
# ./app/.env
REACT_APP_API_URL=http://localhost:
```
Go to the folder ```data``` and adding the ```post.json``` and ```users.json``` to Mongo DataBase.

## Run App
### Backend
```sh
# ./(root_dir)
npm i
npm start
```
### Frontend
```sh
cd app
# ./app
npm i
npm start
```