Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

密码加密传输 #87

Merged
merged 17 commits into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.min.js
**/node_modules/*
**/build/*
29 changes: 29 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"warin",
"double"
],
"semi": [
"error",
"always"
]
}
};
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

11、其它bug修复

## 更新方法:
## 更新方法:

1、checkout 最新 2.0.2 代码

2、删除 node_modules,重新安装依赖包

3、启动数据库,执行npm run dev
3、启动数据库,执行npm run dev


## 说明
Expand All @@ -46,21 +46,22 @@ DoraCMS 使用的技术栈:

4、mongodb 3+

演示地址: [前端开发俱乐部](https://www.html-js.cn)
演示地址: [前端开发俱乐部](https://www.html-js.cn)
后台登录: https://www.html-js.cn/dr-admin 测试账号:doracms/123456

开发文档: [前端内容管理框架 DoraCMS2.0 开发文档](https://www.html-js.cn/details/ryn2kSWqZ.html)
生产部署教程: [DoraCMS2.0 linux部署(生产环境)教程](https://www.html-js.cn/details/ry4-B-hkf.html)


## 目录结构

```
├─build // webpack 相关配置文件
├─configs // 配置文件
│ │
│ │
│ └─logConfig.js // 日志配置文件
├─logs // 日志目录
├─dist // webpack 生成文档存放目录
Expand Down Expand Up @@ -125,6 +126,9 @@ https://nodejs.org/zh-cn/
https://www.mongodb.com/download-center#community

```shell
# 初始化数据库
$ npm init

# 安装依赖
$ npm install

Expand All @@ -136,6 +140,9 @@ $ npm run build

# 启动(需先生成静态文件)
$ npm run start

# 备份数据库
$ npm dump
```

首页
Expand Down
13 changes: 13 additions & 0 deletions build/dump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// 备份DB数据
require('shelljs/global');
const setting = require("../utils/settings");

const moment = require("moment");
const time = moment().format("YYYYMMDD-HHmmss");


if(setting.HOST.match(/127.0.0.1|localhost/)){
exec(`mongodump --gzip --archive=./data/DoraDbData.${time}.gz --db ${setting.DB} `).stdout;
}else{
exec(`mongodump --gzip -h ${setting.HOST} --port ${setting.PORT} -u ${setting.USERNAME} -p ${setting.PASSWORD} --archive=./data/DoraDbData.${time}.gz --db ${setting.DB} `).stdout;
}
12 changes: 12 additions & 0 deletions build/restore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 导入DB数据
require('shelljs/global');

const setting = require("../utils/settings");

const name = "DoraDbData";
const time = ".20171117";
if(setting.HOST.match(/127.0.0.1|localhost/)){
exec(`mongorestore --gzip --archive=./data/${name + time}.gz `).stdout;
}else{
exec(`mongorestore -h ${setting.HOST} --port ${setting.PORT} -u ${setting.USERNAME} -p ${setting.PASSWORD} --gzip --archive=./data/${name + time}.gz `).stdout;
}
1 change: 1 addition & 0 deletions build/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const config = {
'scss_vars': '@/manage/assets/styles/vars.scss',
'~src': path.resolve(__dirname, '../src'),
'~api': path.resolve(__dirname, '../src/api/index-client'),
'~server': path.resolve(__dirname, '../server'),
'~mixins': path.resolve(__dirname, '../src/mixins'),
'~utils': path.resolve(__dirname, '../src/utils'),
'api-config': path.resolve(__dirname, '../src/api/config-client'),
Expand Down
1 change: 1 addition & 0 deletions build/webpack.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var config = merge(base, {
resolve: {
alias: {
'~api': path.resolve(__dirname, '../src/api/index-server'),
'~server': path.resolve(__dirname, '../server'),
'api-config': path.resolve(__dirname, '../src/api/config-server'),
'create-route': './create-route-server.js'
}
Expand Down
Binary file added data/DoraDbData.20171117.gz
Binary file not shown.
Loading