MongoDB Express.js React.js Node.js
Typescript - material ui - iot
git clone https://github.com/johnvan7/mern-iot-dashboard.git
cd mern-iot-dashboard
- Create a new MongoDB database and obtain its connection URI.
-
In the /backend directory of the project, create a new file named .env and copy the contents of template.env into it.
-
Edit the MONGO_URI variable and replace it with the connection URI of your MongoDB database.
-
Edit the JWT_SECRET variable and replace it with a secret string of your choice.
Do the same for frontend (optional).
In your terminal, navigate to the /backend directory
cd backend
and run the following command to install the backend dependencies:
npm install
Now run the following command in the same terminal to start the backend server:
npm run dev
This command will start the backend server, and it will listen for incoming requests.
Open a new terminal window and navigate to the /frontend directory of the project.
cd frontend
npm install
Now run the following command in the same terminal to start the frontend server:
npm run dev
Now open http://localhost:3000 to view it in the browser.