CNode

分享一个小小的 Vue.js + Node.js 的 后台管理系统

分享
Jjkjk77发布于9 年前最后回复8 年前12 回复20625 浏览0 收藏

源码: https://github.com/ericjjj/vms

VMS

Vue Management System

Code Climate Test Coverage license

环境

  • nodejs 6+
  • mongodb 3+

特性

  • Vue 2+
  • Element UI
  • 集成 wangEditor 富文本编辑器 (新浪表情包支持)
  • 集成七牛云图片上传
  • 集成极光推送
  • 完整 Node.js 后端
  • 后端角色权限控制
  • 容易部署

如何运行

git clone https://github.com/ericjjj/vms.git

// 启动后端, 依赖 mongodb
cd backend/utils
// 复制配置文件, 并修改对应配置
cp config.simple.js config.js
cd ..
// 运行
node index.js


// 启动前端
cd backend/utils
// 复制配置文件, 并修改对应配置
cp config.simple.js config.js
cd ..
// 运行
npm run dev

测试

cd backend
npm run test

互相交流 谢谢啦

查看回复

回复 (12)

Y
yakczh#1·9 年前

npm run dev ERROR in ./src/stores/api.js Module not found: Error: Cannot resolve 'file' or 'directory' ../config in vms\frontend
src\stores @ ./src/stores/api.js 8:14-34

ERROR in ./src/tools/index.js Module not found: Error: Cannot resolve 'file' or 'directory' ../config.js in vms\fronte nd\src\tools @ ./src/tools/index.js 15:14-37

J
jkjk77#2·9 年前

cp config.simple.js config.js

H
huruji#4·9 年前

mark

T
TakWolf#5·9 年前

mark

来自酷炫的 CNodeMD

J
jkjk77#6·9 年前
引用 hurujimark

@huruji 谢谢

Y
yakczh#7·9 年前
引用 jkjk77@yakczh cp config.simple.js config.js

@jkjk77 1,412 config.js 1,412 config.simple.js backend 是正常的 是在npm run dev的时候报错 好象是webpack的问题 完整的错误信息  ------------------ npm run dev VMS@1.0.0 dev  vms\frontend node build/dev-server.js

Listening at http://127.0.0.1:8080

webpack: wait until bundle finished: /index.html webpack built 913fa36a361ef1997f48 in 53071ms Hash: 913fa36a361ef1997f48 Version: webpack 1.14.0 Time: 53071ms Asset Size Chunks Chunk Names static/fonts/icomoon.0a74426.eot 15.6 kB static/fonts/icomoon.9f5fd7b.ttf 15.5 kB static/fonts/icomoon.7d4ac7d.woff 15.6 kB static/img/icomoon.f558046.svg 47.3 kB app.js 9.25 MB 0 app

WARNING in .//vue-loader/lib/template-compiler?{"id":"data-v-2f9cc3c4"}!.//vue-loader/lib/templat -compiler/preprocessor.js?raw&engine=pug!./~/vue-loader/lib/selector.js?type=template&index=0!./src views/items/Users.vue : component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.

WARNING in .//vue-loader/lib/template-compiler?{"id":"data-v-2f9cc3c4"}!.//vue-loader/lib/templat -compiler/preprocessor.js?raw&engine=pug!./~/vue-loader/lib/selector.js?type=template&index=0!./src views/items/Users.vue : component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.

ERROR in ./src/stores/api.js Module not found: Error: Cannot resolve 'file' or 'directory' ../config in  \vms\frontend src\stores @ ./src/stores/api.js 8:14-34

ERROR in ./src/tools/index.js Module not found: Error: Cannot resolve 'file' or 'directory' ../config.js in  \vms\front nd\src\tools @ ./src/tools/index.js 15:14-37 Child html-webpack-plugin for "index.html": Asset Size Chunks Chunk Names index.html 1.47 MB 0 webpack: Failed to compile.

J
jiaxiang8756#9·9 年前

MacBook-Pro:backend jiahongxiang$ NODE_ENV=dev node index.js module.js:471 throw err; ^

Error: Cannot find module 'babel-core/register' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/Users/jiahongxiang/Downloads/demo/vms-master/backend/index.js:6:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

楼主我这个错是什么原因?
M
MrShenSH#11·9 年前

学习了 From Noder

E
ezpod#12·8 年前
参与回复
登录后即可参与回复。登录