- Node.js
- NPM
- Postgresql
Use db.sql file to create SQL schema. Use mock_data.sql file to fill database with mock data.
- npm install
- Create env variables DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME, APP_PORT or save them to .env file
- npm start
For now it is implemented CRUD methods for Teachers entity.
- Get all the teachers - GET on /teachers
- Get a teacher - GET on /teachers/id
- Create a teacher - POST to /teachers
- Delete a teacher - DELETE on /teachers/id
- Update a teacher - PUT to /teachers/id
- Get all math teachers with more than 10 years of expirience with lectures in room 100 on thursday between 8:30 and 14:30 - GET on /targetmathteachers