Skip to content

mcmyth/Flat-Blog-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flat-Blog-Server

npm version typeorm version express version license

前端请移步到Flat-Blog

基于Express,采用TypeORM进行数据库管理

Demo: https://blog.mc-myth.cn

安装

npm install

启动

npm run start
配置后端api的URL

src/config/blog.config.js中配置jwt/session/cross相关信息

配置COS/邮箱/数据库

用于存储用户头像/头图/文章文件上传到腾讯云对象储存

src/config/env.ts

export const env = {
  cos: {
      secretId: 'Your secretId',
      secretKey: 'Your secretKey',
      Bucket: 'Your Bucket',
      Region: 'Your Region',
      remoteBasePath: 'static/',
      localBasePath: 'static/',
      assetsDomain: 'Your COS Custom Domain'
    },
  email: {
      user: 'Your Email',
      pass: 'Your Password'
    },
  database: {
      host: "Your Mysql Host",
      port: 3306,
      username: "root",
      password: "Your Mysql Password",
      database: "Your Mysql Database",
  }
}

Releases

No releases published