The main purpose of this repository is getting a basic back-end app.You can use it for your all app.
Clone the repository
git clone --depth=1 https://github.com/Mankurt543/ts-crud-api <project_name>
Install dependencies
cd <project_name>
npm install
Running locally:
npm run dev
Build project:
tsc
Module | Description |
---|---|
Express | https://www.npmjs.com/package/express |
Mongoose | https://www.npmjs.com/package/mongoose |
jsonwebtoken | https://www.npmjs.com/package/jsonwebtoken |
config | https://www.npmjs.com/package/config |
cookie-parser | https://www.npmjs.com/package/cookie-parser |
bcrypt | https://www.npmjs.com/package/bcrypt |
dayjs | https://www.npmjs.com/package/dayjs |
cors | https://www.npmjs.com/package/cors |
mongoose-unique-validator | https://www.npmjs.com/package/mongoose-unique-validator |
http-status-codes | https://www.npmjs.com/package/http-status-codes |
pino | https://www.npmjs.com/package/pino |
pino-pretty | https://www.npmjs.com/package/pino-pretty |
yup | https://www.npmjs.com/package/yup |
express-async-handler | https://www.npmjs.com/package/express-async-handler/v/1.0.2 |
- User signup,login,create,update,delete operations.
- NoSql database with mongoDb
- Authentication and authorization :Used refresh and access token logic with jsonwebtoken.
- Logging with morgan and pino.
- The "yup" module was used to validate certain data.
- Error handling : with express error handler middleware.
- Environment variables :using config.
Note: Please don't forgot to write necessary variables in config file.
MIT