前言
提示:这里可以添加本文要记录的大概内容:
这里是本人学习 cool-admin 的前期准备工作,准备用cool-admin 创建一个简单的视频管理后台
提示:以下是本篇文章正文内容,下面案例可供参考
一、cool 项目地址
官网:https://www.cool-js.com/
后端GitHub源码:https://github.com/cool-team-official/cool-admin-midway
后端Gitee源码:https://gitee.com/cool-team-official/cool-admin-midway
前端GitHub源码:https://github.com/cool-team-official/cool-admin-vue.git
前端Gitee源码:https://gitee.com/cool-team-official/cool-admin-vue.git
示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。
二、安装项目
代码如下(示例):
git clone https://gitee.com/cool-team-official/cool-admin-midway
cd cool-admin-midway
npm install
git clone https://gitee.com/cool-team-official/cool-admin-vue.git
cd cool-admin-vue
npm install
三、创建数据库
如果只是在本地开发测试,可以使用小皮面板创建数据库,官网地址:https://www.xp.cn/
四、cool-admin-midway后端数据库配置修改
cool-admin-midway/src/config/config.local.ts
dataSource: {
default: {
type: 'mysql',
host: '127.0.0.1',
port: 3306,
username: 'coolTest',
password: '123456',
database: 'cool_video_test',
// 自动建表 注意:线上部署的时候不要使用,有可能导致数据丢失
synchronize: true,
// 打印日志
logging: false,
// 字符集
charset: 'utf8mb4',
// 是否开启缓存
cache: true,
// 实体路径
entities: ['**/modules/*/entity'],
},
},
五、启动前后端项目
前后端的启动命令都是 npm run dev
,启动后访问http://localhost:9000 即可看到演示效果。