This is a simple express server designed to store information about cupcakes. Instead of using a real database, I opted to use a .json file that is created at runtime. If the file already exists, it will be reused. When running this server, the default port 1234 will be used. The port can be customized through a .env file Based on the Swagger doc provided:
Add a cupcake to db
Get all cupcakes
Get cupcake at id
Update cupcake at id
Delete cupcake at id
{ id: int, name: string | required, description: string, price: number | required, ingredients: array[string] }
Please make sure node is able to write to this folder. A file named CupcakeDB.json will be created at the root of this repo when running server.
npm install
npm start
npm test