This project was built using Node, Typescript and Express framework.
To run the project locally, the steps to follow are:
- Add an .env file at the root of the project, following the structure provided at .env.example.
- Run
npm install
to install dependencies. - Run
npx prisma migrate dev
to create and populate the database (SQLite). - Run
npm run dev
to spin up the server. - Run
npm run test
to run tests.
- POST /reservation
body: {
startHour: number;
type: string;
numberOfPeople: number;
}
Example:
body: {
startHour: 8;
type: "RS";
numberOfPeople: 2;
}
- GET /reservation/:id
The id should be provided in the post reservation response if successful.