To run the LeetCode React website locally, follow these steps:
-
Navigate to the client directory:
cd client -
Install the required dependencies:
npm i
-
Run the development server:
npm run dev
-
The frontend will be hosted locally.
-
Navigate to the server directory:
cd server -
Install the required dependencies:
npm i
-
Start the backend server:
node index.js
-
The backend will now be running.
-
Open your web browser and go to http://localhost:YOUR_PORT (Replace
YOUR_PORTwith the port number your frontend is running on). -
Create a new user account.
-
You will be redirected to the "Problem Set/All" page, which displays all the questions.
Enjoy using LeetCode!