ShadowEditor/UserGuide.md
2018-12-01 22:15:29 +08:00

54 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 使用指南
**该项目仅支持Windows系统电脑上需要安装.Net Framework 4.5。**
**推荐使用最新版谷歌浏览器查看示例,不保证兼容其他浏览器。**
1. 安装`NodeJs`,在当前目录,执行以下命令。
```bash
npm install
npm run build
```
2. 下载`MongoDB`安装并启动MongoDB服务。MongoDB服务的默认端口为27017。
```bash
mongod --dbpath=D:\mongodb\db --logpath=D:\mongodb\log\mongoDB.log --install --serviceName MongoDB
net start MongoDB
```
3. 编辑文件`ShadowEditor.Web/Web.config`,将`27017`修改为你电脑上MongoDB服务的端口。
```xml
<add key="mongo_connection" value="mongodb://127.0.0.1:27017" />
```
4. 使用`Visual Studio 2017`打开项目,生成`ShadowEditor.Web`项目。
5.`ShadowEditor.Web`部署在iis上即可在浏览器中访问。
6. 为了保存各种类型文件能正常下载需要在iis上添加以下两个MIME类型。
| 文件扩展名 | MIME类型 | 说明 |
| --------- | -------- | ---- |
| .* | application/octet-stream | 各种格式后缀文件 |
| . | application/octet-stream | 无后缀文件 |
7. 编译文档请安装gitbook。
```bash
npm install -g gitbook-cli
```
然后切换到`docs-dev`目录安装gitbook插件。
```bash
gitbook install
```
然后切换到上级目录,执行以下命令生成文档。
```bash
npm run build-docs
```