- Clone the repository
git clone https://github.com/Abhimanyu-dev/DevCamp.git- Go into the backend directory
cd DevCamp
cd backend- Create an env file and paste the following in it
MONGOURL = "mongodb+srv://abhi:abhi@cluster0.mojdm.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
PORT = 5000
- Type the following commands in the terminal
npm install
node ./index.jsThis will start the backend server written in express with mongo db. You can test the routes and websocket using postman. Available routes:
- localhost:5000/api/stocks/:ticker/:date : This fetches data for a particular stock(ticker) for a particular date
- localhost:5000/api/stocks/:ticker : This fetches all the for a particular stock.
- localhost:5000/api/stocks : This fetches all the data from the database
- Go into the directory where you cloned the repo and then go into the frontend directory.
cd frontend- Run the following command
npm install
npm run dev- You can visit the page on http://localhost:5173
The frontend is not completed but it is able to connect to the backend server socket and display some data.