Following the MERN Stack Tutorial by The Net Ninja here.
-
Create a .env file in backend, following the structure from example.env.
MONGO_URI
andJWT_SECRET
values are provided by the repository owners.
-
Starting the backend express server:
- In the backend directory, run
npm install
. - Start the server with
npm run dev
, running on port 5000. (specified in .env) - If successful, the server will print Connected to database and show incoming HTTP requests.
- In the backend directory, run
-
Starting the React Frontend:
- In a separate terminal and in the frontend directory, run
npm install
- Start the Frontend with
npm start
, running on port 3000.
- In a separate terminal and in the frontend directory, run