A social webapp
Follow these steps to set up the project on your local machine.
Make sure you have the following installed:
- Node.js (download from https://nodejs.org/)
- Git (download from https://git-scm.com/)
-
Clone the Repository
Open a terminal and run the following command to clone the repository:git clone https://github.com/your-username/your-repository.git
-
Navigate to the Project Directory Change into the directory where the project was cloned:
cd your-repository
-
Install Dependencies Run the following command to install the dependencies listed in package.json and package-lock.json:
npm install
Depending on how your project is set up, you can use one of the following commands: • To start the development server:
npm run dev
• To build the project:
npm run build
• To start the production server:
npm start
The project requires environment variables, create a .env file in the root directory and add the required keys. An example .env file might look like this:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=example
PORT=5500
Error: PORT already in use
Solution: Change the PORT in your .env file or terminate the process using the port.
Error: MODULE_NOT_FOUND
Solution: Ensure you ran npm install before starting the project.