Coder Social home page Coder Social logo

sh7ning-mirror / nestjs-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onfuns/nestjs-blog

0.0 1.0 0.0 3.04 MB

Nestjs + Mysql博客系统

Home Page: https://demo.onfuns.com

Shell 0.03% JavaScript 1.68% TypeScript 66.85% CSS 0.22% PLpgSQL 14.00% Less 17.22%

nestjs-blog's Introduction

基于 NextJS + NestJS + Mysql 开发的博客系统,支持文章发布、分类、标签、评论、角色权限等功能,适合搭建博客或学习使用。

技术栈

  • ServerNestJS + TypeORM + Mysql + TypeScript
  • ClientNextJS + React + Antd + Mobx + TypeScript
  • AdminUmiJS + React + Antd + Mobx + TypeScript

预览

前台

后台

启动

分别进入 serverclientadmin 对应目录启动

# 开发
$ npm run start:dev
# 生产
$ npm run start:prod

构建

可分别进入各子目录单独构建,也可以在项目根目录统一构建,如在根目录分别执行

$ npm run build:admin
$ npm run build:server
$ npm run build:client

部署

上传 dist 目录到服务器,同时参考 nginx.conf 设置代理,或自己集成 docker 启动

$ sudo npm install pm2 -g
$ cd client && npm install --production && npm run start:prod
$ cd server && npm install --production && npm run start:prod

数据库配置

新建数据库nest_blog,本地可以导入 server 中的初始化数据 init.sql。本地数据库默认配置 server/src/config/dev.ts 。生产环境在 server目录新建 .env.production 文件,按需更改

DB_HOST = localhost
DB_USER = xxxxxx
DB_PASS = xxxxxx
DB_DATABASE = nest_blog
JWT_TOKEN = xxxxxxxxxxxx

功能分类

后台功能

  • 文章增删改查
  • 分类增删改查
  • 标签增删改查
  • 评论增删改查
  • 登录 token 校验
  • 权限增删改查
  • 用户增删改查
  • 首页面板统计
  • 权限校验

前台功能

  • 文章展示
  • 分类
  • 评论

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.