Olostep Track is a web application designed to scrape and analyze web content, featuring both frontend and backend components. This guide will help you set up the project locally.
The frontend of Olostep Track is built using Next.js. Follow these steps to get the frontend running:
- Ensure you have Node.js installed on your machine. You can download it here.
-
Clone the repository (if you haven't already):
git clone https://github.com/YourUsername/Olostep-Track.git
-
Navigate to the frontend directory:
cd Olostep-Track/my-app
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Access the application: Open your browser and navigate to
http://localhost:3000
to view the application.
The backend of Olostep Track is built using Node.js, Express, and MongoDB. Follow these steps to get the backend running:
- MongoDB Atlas Account: Set up a free account on MongoDB Atlas and create a new cluster.
- Node.js: Ensure Node.js is installed on your machine.
-
Create a
.env
file in the root directory of the backend (e.g.,Olostep-Track/server
) and add your MongoDB Atlas connection URI and backend server url:MONGO_ATLAS_URI="your-mongodb-uri-here" NEXT_PUBLIC_SERVER_URL = "http://localhost:5000"
Replace
"your-mongodb-uri-here"
with the connection string provided by MongoDB Atlas. -
Navigate to the backend directory:
cd Olostep-Track/server
-
Install backend dependencies:
npm install
-
Start the backend server:
npm run dev
-
Test the backend: The backend should be running on
http://localhost:5000
. You can test it by visitinghttp://localhost:5000/ping
, which should return a "Server Is Up!" message.
- MongoDB Connection Issues: Ensure that your MongoDB URI is correctly formatted in the
.env
file, and that the user has the correct permissions to access the database. - Port Conflicts: If
localhost:3000
orlocalhost:5000
is already in use, you can modify the port in thepackage.json
scripts or.env
file.