**This is a full CRUD featured REST API for admins to manage participant data - built with Express, Sequelize, MySQL, and deployed using DigitalOcean on Aiven.io and Render.com
- NodeJS/Express
- Sequelize ORM
- MySQL hosted on aiven.io
- render.com
- dotenv for enviroment configuration
- winston for logging
- Postman for endpoint testing
- Basic Authentication with bcrypt and admin seeding during database initialization.
- FULL CRUD for Participant with its Home and Work relationships.
- Sequelize query validation + custom built error handling.
- MVC structure and service layers
- Logging with winston and native JS
- Cloud database
- GET:
- /participants | Find all participants
- /participants/details | Find all names and emails
- /participants/:email | Find spesific participant by email
- /participants/work/:email | Find work info by email
- /participants/home/:email | Find home info by email
- POST:
- /participants/add | Add new participants
- PUT:
- /participants/:email | Update a participant by email
- DELETE:
- /participants/:email | Delete a participant and assosicated Work and Home by email
- Admin authentication with Basic Authentication using bcrypt hash comparison
- Secrets and configuration in enviroment variables
- Cascade deletion with foreign key setup in Sequelize
- Render: https://census-api-mzqm.onrender.com/
- Database hosted via Aiven (Amsterdam)
git clone https://github.com/joachim-vogt/census-api.git cd census-api npm install cp .env.example .env npm start
Link to hosted app: https://census-api-mzqm.onrender.com/
Joachim Vogt - Built as backend development project for Noroff Tech School