Skip to content

pavece/esp32-watersensor

Repository files navigation

WaterSensor Cover

ESP32 WaterSensor backend

This fastify backend is used for my ESP32 WaterLevelSensor project. The purpose of this backend is registering sensor readings and sending notifications. If you want to learn how i've created the hardware part for this sensor you can read my blog article.

Run in dev mode

Fill environment variables

Rename .env.template to .env and fill all the variables.

Dev Database

If you want, you can use the provided docker compose to run a development PostgreSQL instance. Just make sure all the related environment variables are filled and docker is running. Then run

docker compose up -d

Run the project

Install packages

npm install

Run prisma migrations and generate the client

npx prisma generate dev --name "Initial migration"

Run the server

npm run dev

Deploy

You can deploy this project for free as is using vercel. Just make sure to spin up a production PostgreSQL instance and add all the environment variables.

About

A simple backend service used for sending notifications via telegram / email when an endpoint is called.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors