Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanokpit-yowaratch/nestjs-mysql-blog
Blog API by NestJS
https://github.com/kanokpit-yowaratch/nestjs-mysql-blog
dotenv eslint express jest multer mysql2 nestjs nestjs-mysql swagger swagger-ui-express typeorm typescript
Last synced: about 1 month ago
JSON representation
Blog API by NestJS
- Host: GitHub
- URL: https://github.com/kanokpit-yowaratch/nestjs-mysql-blog
- Owner: kanokpit-yowaratch
- Created: 2023-12-21T01:29:47.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-10-30T19:05:11.000Z (about 2 months ago)
- Last Synced: 2024-10-30T20:19:23.484Z (about 2 months ago)
- Topics: dotenv, eslint, express, jest, multer, mysql2, nestjs, nestjs-mysql, swagger, swagger-ui-express, typeorm, typescript
- Language: TypeScript
- Homepage: https://kanokpit.com
- Size: 429 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## nestjs-mysql-blog
This is a blog's `api` application created by NestJS
## Tech Stack
`NestJS` `Express` `TypeScript`
## Installation
```bash
$ npm install
```## Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## PM2 command
```bash
# build to create dist/main.js
$ npm run build# pm2 to start api service
$ pm2 start dist/main.js --name "nestjs-api"
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## Configuration file
**`.env`** file as follows:
- API_PORT=[avoid 5000]
- DB_HOST=localhost
- DB_PORT=3306
- DB_USERNAME=
- DB_PASSWORD=
- DB_DATABASE=
## Demo
[kanokpit.com](https://kanokpit.com)
## Client example
Client blog repo: [nextjs-client-blog](https://github.com/kanokpit-yowaratch/nextjs-client-blog)