This project is completed as part of an assignment and is built using the MERN (MongoDB, Express, React, Node.js) tech stack.
- MongoDB: NoSQL database for storing user data.
- Express: Web framework for Node.js for building the server-side logic.
- React: Frontend library for building user interfaces.
- Node.js: JavaScript runtime for server-side programming.
- CORS: Middleware to enable Cross-Origin Resource Sharing.
- JSON Web Token (JWT): For authentication and securing endpoints.
- User registration and login.
- Authentication using JSON Web Tokens (JWT).
- Display of user's name upon login.
- Workspace displaying names and emails of all users.
- Node.js and npm installed on your machine.
- MongoDB installed and running.
-
Clone the repository:
git clone https://github.com/AdityaSen-1606/Assignment.git cd Assignment
-
Install server dependencies:
cd server npm install
-
Install client dependencies:
cd ../client npm install
-
Set up environment variables: Create a .env file in the server directory and add the following:
PORT=3000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
Running the Server
- Start the backend server:
cd server npm start
- Start the frontend development server:
cd ../client npm start