Complete backend
A small but complete backend: sign up, log in with a JWT, and a tasks API that only lets each user see and change their own tasks. Add a database URL and a secret, and it works end to end.
Backend templateAuth · JWT · PostgreSQL · Protected API64 nodes6 endpoints1
A small but complete backend: sign up, log in with a JWT, and a tasks API that only lets each user see and change their own tasks. Add a database URL and a secret, and it works end to end.
What's included
- Sign Up and Log In routes with bcrypt password hashing and signed JWT tokens
- A guarded Get Profile route that rejects a missing or invalid token with a 401
- A tasks API (list, create, delete) where every query is scoped to the signed-in user
- A Setup flow that creates the users and tasks tables
- Set DATABASE_URL and JWT_SECRET (a long random string) in the Environment node before you run