This school project is an appointment scheduler microservice with REST endpoints, developed using Node.js, Express.
- About the project
- Features of version 1.0.0
- Setup requirements
- How to start
- Endpoints
- Main technologies and services
Clients can book 30 minute long appointments. The service will check for colliding appointments and alert the client. Successful bookings will be stored in MongoDB.
- basic CRUD operations
- the client must include only the very minimal amount of data
- start time, and/or booked appointment ID (from MongoDB)
- commenting is optional
- fitting error messages
- plus error handler middleware
- smoke test
- Terminal
- Visual Studio Code
- Insomnia, Postman
- Node.js
- Mongo DB
-
Clone the repository and open with Visual Studio Code
-
Using the terminal:
cd backend
npm install
cd ..
- Create an .env file at the backend root
- fill out with your own data or ask permission from the developer
PORT={your choice, ie: 8080}
APP_URL={your front-end url, ie: http://localhost:3000}
CONNECTION_STRING={your Mongo database}
- Start the localhost
cd backend
npm run dev
(<!-- using nodemon in development -->)
Each page lists 10 appointments.
JSON body:
{
"date": "2022-07-19"
}
Will be an array of appointment objects.
[
{
"_id": "12345",
"date": "2022-07-19",
"startTime": "2022-07-19T06:00:00.000Z",
"endTime": "2022-07-19T06:30:00.000Z",
"comment": "quick beard trim",
"__v": 0
},
...
]
Will return that one appointment
{
"date": "2022-07-19",
"startTime": "2022-07-19T06:00:00.000Z",
"endTime": "2022-07-19T06:30:00.000Z",
"comment": "quick beard trim",
"_id": "12345",
"__v": 0
}
JSON body:
{
"start": "2022-07-19T08:00",
"comment": "quick beard trim"
}
Will return the created appointment
{
"date": "2022-07-19",
"startTime": "2022-07-19T06:00:00.000Z",
"endTime": "2022-07-19T06:30:00.000Z",
"comment": "quick beard trim",
"_id": "12345",
"__v": 0
}
JSON body:
{
"start": "2022-07-19T09:00",
"comment": "beard and hair cut, too"
}
Will return the modified appointment
{
"date": "2022-07-19",
"startTime": "2022-07-19T07:00:00.000Z",
"endTime": "2022-07-19T07:30:00.000Z",
"comment": "beard and hair cut, too"
"_id": "12345",
"__v": 0
}
Will return the deleted appointment
{
"date": "2022-07-19",
"startTime": "2022-07-19T06:00:00.000Z",
"endTime": "2022-07-19T06:30:00.000Z",
"comment": "quick beard trim",
"_id": "12345",
"__v": 0
}
Node.js, Express
MongoDB, Mongoose
Jest
Morgan