Backend for Annadata
Backend of Annadata
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
Your machine should have Npm(or Yarn) and Node.js installed to use it locally.
Setup and Installation
Setting up the repository locally
- First fork the repo 🍴 to your account.
Go to the forked repo and clone it 👥 to your local machine:
git clone https://github.com/Your_Username/NodeBackend.git
This will make a copy of the code to your local machine.
- Now move to the
NodeBackend
directory.
cd NodeBackend
- Now check the remote of your local code by:
git remote -v
The response should look like:
origin https://github.com/Your_Username/NodeBackend.git (fetch)
origin https://github.com/Your_Username/NodeBackend.git (push)
To add upstream to remote, run:
git remote add upstream https://github.com/AnnadataHackfest/NodeBackend.git
Again run git remote -v
, the response should look like:
origin https://github.com/Your_Username/NodeBackend.git (fetch)
origin https://github.com/Your_Username/NodeBackend.git (push)
upstream https://github.com/AnnadataHackfest/NodeBackend (fetch)
upstream https://github.com/AnnadataHackfest/NodeBackend (push)
- Once the remote is set, install all the necessary dependencies by the following command:
npm install
Run locally
Run the below command to start the server:
npm run dev
Go to: http://localhost:5000
Tech stack
-
Used Ambeedata API for realtime information about soil, pollen, fire alert, air quality, water vapour and weather information.
-
Used Open Weather API for weather forecast
-
Used Twilio for sending SMS
-
Used Node Mailer for sending email
-
Used Cloudinary for storing media files like photos and videos
-
Used MongoDB for database
-
Used JWT for secure authentication