Before starting the installation process, fork the repository to your GitHub account by clicking the "Fork" button at the top right of the repository page.
To set up the project locally, follow these steps:
-
Clone the forked repository:
git clone https://github.com/yourusername/CampX.git cd CampX
-
Install the necessary dependencies:
npm install
-
Get the necessary environment variables: 3.1 MongoDB: Go to MongoDB website and sign up/Log in Create a new database in a cluster obtain it's DB URL 3.2 Cloudinary: Go to cloudinary website and sign up there create a new project and obtain the following fields
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_KEY=your_cloudinary_api_key CLOUDINARY_SECRET=your_cloudinary_api_secret
3.3 Mapbox: Go to Mapbox website and sign up there to obtain the mapbox token -
Set up environment variables:
Create a
.env
file in the root directory with the following variables:DB_URL=your_mongo_atlas_url CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_KEY=your_cloudinary_api_key CLOUDINARY_SECRET=your_cloudinary_api_secret MAPBOX_TOKEN=your_mapbox_token
-
Start the server:
node app.js
-
View the app: Open your browser and navigate to
http://localhost:3000
to view the app.