Skip to content

Latest commit

 

History

History
72 lines (39 loc) · 1.82 KB

INSTALL.md

File metadata and controls

72 lines (39 loc) · 1.82 KB

Precondition

To run Fiora, you need to have Node.js (>= version 8.9.0) environment, MongoDB database

Run on local

Step 1

Clone the project to the local git clone https://github.com/yinxin630/fiora.git -b master

Step 2

Installation dependencies, recommended yarn yarn or npm install

Step 3

Modify the configuration file:

  • server config: config/server.js
  • client config: config/client.js
  • webpack config: config/webpack.js

In the server config, the picture is stored in the server if the qiniu.com CDN is not configured. will increase service bandwidth pressure and flow consumption, so it is more recommended to use qiniu.com CDN

qiniu.com config introduce:

  • qiniuAccessKey get from qiniu.com 个人面板 - 密钥管理 page
  • qiniuSecretKey get from qiniu.com 个人面板 - 密钥管理 page
  • qiniuBucket qiniu.com bucket name
  • qiniuUrlPrefix qiniu.com bucket domain. get from qiniu.com 存储空间 - 内容管理 page. should be //xxx/ or http://xxx/ or https://xxx/ format

Step 4

run server npm run server

Step 5

run client npm run client

Step 6

The browser will automatically open Fiora, and you can manually open the url http://localhost:8080

Run on server

Step1, Step2, Step3

Link run on local

Step4

build client npm run build

move build result to public directory mv dist/fiora/* public

Or if you use qiniu.com CDN, you can upload the build result to qiniu.com, and then just put index.html in the public directory, so the performance will be better

Step5

use pm2 start server export NODE_ENV=production && pm2 start server/main.js --name="fiora"

第六步

open page http://[服务端ip]:[fiora端口号]