https://github.com/yenilikci/ts-rest-api
Node.js REST API with Express.js, Mongoose & TypeScript
https://github.com/yenilikci/ts-rest-api
bcrypt best-practices dayjs expressjs jwt lodash mongoose nanoid pino typescript zod
Last synced: 4 months ago
JSON representation
Node.js REST API with Express.js, Mongoose & TypeScript
- Host: GitHub
- URL: https://github.com/yenilikci/ts-rest-api
- Owner: yenilikci
- Created: 2022-04-11T21:29:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-17T21:45:36.000Z (over 3 years ago)
- Last Synced: 2025-03-15T23:57:37.186Z (7 months ago)
- Topics: bcrypt, best-practices, dayjs, expressjs, jwt, lodash, mongoose, nanoid, pino, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 111 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ts-rest-api
## dependencies
✨ bcrypt
✨ config
✨ cors
✨ dayjs
✨ express
✨ jsonwebtoken
✨ lodash
✨ mongoose
✨ nanoid
✨ pino
✨ pino-pretty
✨ zod
## endpoints
| Endpoint | Http Request Method | Body | Params | Args | Description |
| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ |
| /api/users | POST | {"email": "example@mail.com", "password": "M12345.", "passwordConfirmation": "M12345.", "name": "melihcelik"} | Empty | Empty | It allows us to register the user. |
| /api/sessions | POST | {"email": "example@mail.com", "password": "M12345."} | Empty | Empty | Allows us to log in. Returns tokens. |
| /api/sessions | GET | Empty | Empty | Empty | Get session list. |
| /api/sessions | DELETE | Empty | Empty | Empty | Terminates sessions by updating the session list. |
| /api/products | POST | { "title": "Product 1", "description": "Amazing product", "price": 99.99, "image": "comlaf.com/images/1" } | Empty | Empty | Creates a new product. |
| /api/products | PUT | { "title": "Product 1", "description": "Updated amazing product ", "price": 98.99, "image": "comlaf.com/images/1" } | productId:ObjectId | Empty | Update product by id. |
| /api/products | GET | Empty | productId:ObjectId | Empty | Get product by id. |
| /api/products | DELETE | Empty | productId:ObjectId | Empty | Delete product by id. |