-
安装依赖模块
npm install
-
安装think js依赖
thinkjs 2.0未发布到npm,所以需要从github拉取
git clone https://github.com/75team/thinkjs.git
进入到thinkjs目录下
然后切换到es6
分支
git checkout es6
安装依赖包
npm install
执行编译
npm run compile
建立从thinkjs目录到firekylin/node_modules/thinkjs的软连接 -
编译项目
在项目目录下,执行
npm run compile
如果需要持续开发,可以不执行上一步骤,
在项目目录下执行,进行持续编译
npm run serve
-
安装数据库
本地需具有mysql数据库
建立用户firekylin,密码firekylin
并建立firekylin数据库 -
启动服务器
npm run start
-
访问web页面
打开浏览器,访问
前台: http://localhost:1234/
后台: http://localhost:1234/admin/
如果使用持续编译则使用3000端口
前台: http://localhost:3000/
后台: http://localhost:3000/admin/
这样在修改js或css等文件后,会自动进行编译并刷新浏览器