A node-express-mongoose-with-typescript boilerplate for beginners.
You should write your own mongodb URL on .env.
git clone https://github.com/Byunk/node-express-mongoose-with-typescript.git
cd node-express-mongoose-with-typescript
npm install
cp .env.example .env
npm dev
src
├── app
│ ├── application.ts
│ ├── controllers
│ │ ├── index.ts
│ │ └── user.controller.ts
│ ├── index.ts
│ ├── routes
│ │ ├── application.router.ts
│ │ ├── index.ts
│ │ └── users.router.ts
│ ├── schemas
│ │ ├── index.ts
│ │ └── user.schema.ts
│ └── util
│ └── logger.ts
└── index.ts
It provides the Winston logger util by default.
You don't have to use console.log
. Instead, import logger util and use logger
logger.info('info')
logger.warn('warn')
logger.error('error')
MIT