Node RESTful API for the book-club-client, built with express, mongoose and typescript.
Provides a server to organize your reading list.
Install dependencies:
yarn (or npm i)
Start the services:
yarn dev (or yarn build)
just make sure to have your package.json as it follows:
"scripts": {
"dev": "nodemon src/server.ts",
"build": "sucrase ./src -d ./dist --transforms typescript,imports"
}
aswell as your nodemon file with:
"watch": ["src"],
"ext": "ts",
"execMap": {
"ts": "sucrase-node src/server.ts"
}
src/controllers
follows the resource.controller name conventionsrc/schemas
follows the resource.schemas name conventionsrc/routes.ts
basic routingsrc/server.ts
listening to port (3333)
yarn build # Build production ready dist folder
yarn dev # Start server in dev mode
yarn lint # Lint project (eslint)
- BookController
- GET /books
- POST /books
- Payload
{ title: String, description: String, date: String, genre: String, }
- DELETE /books/:id