This is the backend for the EPICS project.
We are using Node + ExpressJS for the backend. This will be used to call the APIs to apply the ML model to the data and add it to the database.
- There are routes to fetch the sensor data from the postgres database.
- A route on /upload which checks for
sensor_data.csvin the same directory as the server and adds any new entries to the database.
Note - Ensure that you have set up your github ssh key in your system (ideally linux based) to be able to push to the repo. If not, refer to this resource - https://www.theodinproject.com/lessons/foundations-setting-up-git
Make sure you have your
.envfile setup properly to ensure the connection with the postgreSQL server happens properly. Your postgreSQL needs to be active when making the connection as well.
- Copy the SSH link from the github repository
git clone [SSH clone link]- Make sure the
.envfile is updated (since it is in .gitignore) - Ensure all dependencies are there using
npm i - Run
npm run devto start the server (alternate -node --watch index.js)
- Fork the repository
- Clone the forked repo
- Make changes and push it to your forked repo
- Create pull request