Skip to content

Sohaib-Snouber/web_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to web development project

Web Project

This project is a web application with both frontend and backend components.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js and npm
  • MongoDB Community Edition

For more details about the initial setup and packages used, refer to the initial commit here.

Setup Instructions

Clone the Repository

First, clone this repository:

git clone https://github.com/Sohaib-Snouber/web_project.git

Backend Setup

  1. Navigate to the backend directory:

    cd task-manager-backend
  2. Initialize the npm project:

    npm install
    npm init -y
  3. macOS Only: Start the MongoDB service with brew:

    brew services start mongodb-community@8.0

    Note: On other operating systems, you may need a different setup to start MongoDB.

  4. Run the backend server:

    node server.js

    If everything is set up correctly, you should see the message:

    Server is running on port 5001
    

Frontend Setup

  1. Navigate to the frontend directory:

    cd task-manager-frontend
  2. Install the necessary packages:

    npm install
  3. Start the frontend development server:

    npm start

    If the frontend works correctly, it should automatically open a web browser with the frontend webpage.

Database Setup

There are two database options available:

a) Local Database

This was already set up in Step 3 of the Backend Setup section.

b) Cloud Database

  1. Create a cloud MongoDB database.
  2. Link the database as shown in this commit.

Note:
Using a cloud database for all developers during the development process is not recommended as it may cause conflicts due to differences in model definitions among developers.
To avoid these issues, use the following configuration in server.js file to switch databases:

const dbChoice = 1; // 1 for local, 2 for cloud

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors