yangkaihong 5ea18a89e6 添加财务备注 %!s(int64=3) %!d(string=hai) anos
..
.vscode fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
public fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
src 5ea18a89e6 添加财务备注 %!s(int64=3) %!d(string=hai) anos
test fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.dockerignore fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.editorconfig fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.eslintrc.json fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.gitattributes fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.gitignore fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
.prettierrc.js fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
Dockerfile fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
LICENSE fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
README.md 5ea18a89e6 添加财务备注 %!s(int64=3) %!d(string=hai) anos
bootstrap.js fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
f.yml fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
package.json dfb250ad9d 删除不必要的文件 %!s(int64=3) %!d(string=hai) anos
tsconfig.json fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos
uni.md fb4eb6a18e 测试 %!s(int64=4) %!d(string=hai) anos

README.md

shuyou_game_complete添加字段:remark

Node版后台基础框架基于Egg.js

基础:egg.js

数据:typeorm

缓存:egg-redis

鉴权:egg-jwt

网络:axios

修改数据库配置,配置文件位于src/config/config.local.ts

数据库为mysql(>=5.7版本),node版本(>=12.x),首次启动会自动初始化并导入数据

config.orm = {
    type: 'mysql',
    host: '127.0.0.1',
    port: 3306,
    username: 'root',
    password: '',
    database: 'cool-admin',
    synchronize: true,
    logging: true,
}

安装依赖并运行

$ npm i
$ npm run dev
$ open http://localhost:8001/

注: npm i如果安装失败可以尝试使用cnpm,或者切换您的镜像源

部署

rm -rf node_modules rm package-lock.json npm cache clear --force npm install

npm run build

$ npm start
$ npm stop

内置指令

  • 使用 npm run lint 来做代码风格检查。
  • 使用 npm test 来执行单元测试。

个人记录

  • rm -rf node_modules
  • rm package-lock.json
  • npm cache clear --force
  • npm install

  • npm run start

  • lsof -i:8001

  • netstat -tunlp | grep 8001

  • curl 'http://127.0.0.1:8001'

  • SERVER需要单独安装axios

  • cd /home/cool/server

  • npm i axios

  • // npm install qiniu

  • 前端

  • // yarn add spark-md5

  • // yarn add sha1-file-web

  • yarn add qiniu-js