To run Fiora, you need to have Node.js (>= version 8.9.0) environment, MongoDB database
Clone the project to the local git clone https://github.com/yinxin630/fiora.git -b master
Installation dependencies, recommended yarn yarn
or npm install
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 个人面板 - 密钥管理 pageqiniuSecretKey
get from qiniu.com 个人面板 - 密钥管理 pageqiniuBucket
qiniu.com bucket nameqiniuUrlPrefix
qiniu.com bucket domain. get from qiniu.com 存储空间 - 内容管理 page. should be//xxx/
orhttp://xxx/
orhttps://xxx/
format
run server npm run server
run client npm run client
The browser will automatically open Fiora, and you can manually open the url http://localhost:8080
Link run on local
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
use pm2 start server export NODE_ENV=production && pm2 start server/main.js --name="fiora"
open page http://[服务端ip]:[fiora端口号]