Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahinkor/social-media
A social media project with expressJs framework and mongoDB database and ejs template engine.
https://github.com/bahinkor/social-media
backend express expressjs mongodb mongoose nodejs social-media
Last synced: 15 days ago
JSON representation
A social media project with expressJs framework and mongoDB database and ejs template engine.
- Host: GitHub
- URL: https://github.com/bahinkor/social-media
- Owner: Bahinkor
- License: mit
- Created: 2024-11-21T10:02:17.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-12-20T13:18:03.000Z (about 2 months ago)
- Last Synced: 2024-12-20T13:22:02.398Z (about 2 months ago)
- Topics: backend, express, expressjs, mongodb, mongoose, nodejs, social-media
- Language: JavaScript
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Social Media Backend
A social media project with expressJs framework and mongoDB database.
## Getting Started
Follow these instructions to get a copy of the project up and running on your local machine for development and testing
purposes.### Prerequisites
You need to have the following software installed on your system:
- Node.js
- MongoDB### Installing
1. Clone the repository to your local machine:
```
git clone https://github.com/Bahinkor/social-media.git
```2. Navigate to the project directory:
```
cd social-media
```3. Install dependencies:
```
npm install
```### Setting Up MongoDB
1. Make sure MongoDB is installed and running on your system.
2. Create a new database named `social-media`.
### Configuration
1. Create a `.env` file in the root directory of the project.
2. Add the following environment variables to the `.env` file:
```
PORT=8000
MONGODB_URI=mongodb://localhost:27017/social-media
REFRESH_TOKEN_EXPIRE=60
ACCESS_TOKEN_SECRET=RANDOM KEY
NODE_ENV=development
EMAIL=YOUR EMAIL
EMAIL_PASS=YOUR EMAIL APP PASSWORD
HOST=http://localhost:8000
SESSION_SECRET=RANDOM KEY
FRONT_URL=CLIENT HOST URL
```### Running the Server
Start the server by running the following command:
```
npm start
```The server will be running on port 8000 by default.
## Usage
Once the server is running, you can access the application by navigating to `http://localhost:8000` in your web browser.
## Client repo:
[Social Media Project Client Repo](https://github.com/Bahinkor/social-media-client)