A REST API for note management built with Node.js, Express, PostgreSQL and JWT Authentication.
🌐 Live: https://notes-api-production-1d42.up.railway.app
- Node.js
- Express.js
- PostgreSQL
- JWT Authentication
- Bcrypt
POST /auth/register→ Create an accountPOST /auth/login→ Login and get a token
GET /notes→ Get all your notesPOST /notes→ Create a notePUT /notes/:id→ Update a noteDELETE /notes/:id→ Delete a note
You can test the API using Postman.
- Register an account →
POST /auth/register - Login to get your token →
POST /auth/login - Use the token in the
authorizationheader for all notes routes
- Clone the repository
- Run
npm install - Create a
.envfile with your database credentials - Run
node server.js
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=yourpassword
DB_NAME=notes
DB_PORT=5432
JWT_SECRET=yoursecret