This Social Media Application is designed to demonstrate a simple social networking platform built with Node.js, Express.js, and MongoDB. It supports user authentication, CRUD operations for posts, commenting on posts, and admin control over users and posts.
- User Authentication: Allows users to register and login to the platform.
- Post Management: Users can create, read, update, and delete their posts.
- Commenting: Users can comment on posts.
- Admin Controls: Admin users have the ability to manage users and posts across the platform.
Before you begin, ensure you have installed the following:
- Node.js (v14 or newer)
- MongoDB (v4 or newer)
- npm (Node Package Manager)
You can check your Node and npm versions with:
node -v
npm -vInstall NPM Packages:
npm install
Set up environment variables:
Create a '.env' file in the root directory of the project and add your environment variables:
DB_URI=mongodb+srv://your_mongodb_uri_here
To start the server, run:
npm start
The server will be avaliable at 'http://localhost:3000'.