This repository contains the backend code for the Habit Tracker project, developed in the KCL Tech Academy Webdev Workshop Series, hosted by Waseef Khan. The index.html file was developed during Weeks 1 and 2 (HTML & CSS, JavaScript). The backend was developed during Week 3 (Node.js & Express.js). The frontend React application was developed in Week 4 and MongoDB implementation was added in Week 5.
Follow @kcltech and @kcl_tech_academy on Instagram for updates!
To install the necessary npm packages, follow these steps:
-
Clone the repository:
git clone https://github.com/KCL-Tech-Society/kta-webdev.git
Or download the ZIP file from the repository page and extract it.
-
Navigate to the project directory:
cd kta-webdev/habit-tracker-backend -
Install the npm packages:
npm install
-
Create a
.envfile in the project directory and specify thePORT:PORT=5000 MONGO_URI=your-mongodb-uri
-
After installing the npm packages, you can start the development server with:
npm run dev
To set up and start the frontend React application, follow these steps:
-
Navigate to the frontend directory:
cd ./frontend -
Install the npm packages:
npm install
-
Update the
package.jsonfile to add a proxy for the backend:"proxy": "http://localhost:5000"
-
Start the React development server:
npm start
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.