kanokpit-yowaratch / nestjs-mysql-blog

Blog API by NestJS

Home Page:https://kanokpit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo Express Logo TypeScript Logo

nestjs-mysql-blog

This is a blog's api application created by NestJS

Tech Stack

NestJS Express TypeScript

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

PM2 command

# build to create dist/main.js
$ npm run build

# pm2 to start api service
$ pm2 start dist/main.js --name "nestjs-api"

Test

# 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

Client example

Client blog repo: nextjs-client-blog

About

Blog API by NestJS

https://kanokpit.com


Languages

Language:TypeScript 94.0%Language:JavaScript 4.6%Language:HTML 1.4%