Skip to content

This is a basic Product management webapp build using MERN Stack technology

Notifications You must be signed in to change notification settings

Viraj2722/product-management-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Product management Web app

Overview

This project is a MERN stack application featuring a React frontend and an Express backend. It utilizes Vite for frontend development and nodemon for backend development. This README provides instructions on how to set up, run, and deploy the project.

Table of Contents

Installation

  1. Clone the Repository

    git clone <repository-url>
    cd <repository-directory>
  2. Install Dependencies

    Install the dependencies for both the backend and frontend:

    npm install
    npm install --prefix frontend

Running the Project

Development Mode

To start the project in development mode:

npm run dev

This will:

  • Set NODE_ENV to development.
  • Use nodemon to automatically restart the server on code changes.

Build

To build the frontend and install necessary dependencies:

npm run build

This will:

  • Install backend dependencies.
  • Install frontend dependencies and build the frontend project.

Production Mode

To start the project in production mode:

npm run start

This will:

  • Set NODE_ENV to production.
  • Run the backend server.

File Structure

  • frontend/ - Contains the frontend source code and build configuration.
  • backend/ - Contains the backend source code and configuration.
  • package.json - Contains project metadata and scripts.

Environment Variables

Create a .env file in the backend directory with the following variables:

PORT=5000
MONGO_URL=<your-mongodb-connection-string>

Replace <your-mongodb-connection-string> with your actual MongoDB connection string.

Common Issues

  • ENOENT Error: If you encounter an ENOENT error, ensure the frontend/dist directory exists and contains the index.html file. Adjust paths in backend/server.js if necessary.

  • Module Not Found: Ensure all dependencies are installed correctly by running npm install in the root directory.

Deployment

For deployment, ensure the frontend/dist directory is correctly included and accessible by the backend server. Adjust paths in backend/server.js as needed based on your deployment environment.

Contributing

Feel free to open issues or submit pull requests if you find any bugs or have improvements.

To contribute, please fork the repository, make your changes, and submit a pull request with a clear description of the changes and the reason for them.

About

This is a basic Product management webapp build using MERN Stack technology

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published