Firekylin 1.0 & Valine

11/07/2017 评论 Valine

仅供记录

安装 Node 8.0+

curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get install -y nodejs

node -v

下载解压 FireKylin

https://github.com/firekylin/firekylin/releases

安装依赖

cd /path/bpplpp.com/firekylin
npm install

配置 PM2

mv pm2_default.json pm2.json

修改 pm2.conf

{
  "apps": [{
    "name": "bpplpp",
    "script": "production.js",
    "cwd": "/path/bpplpp.com/firekylin",
    "exec_mode": "fork",
    "max_memory_restart": "1G",
    "autorestart": true,
    "node_args": [],
    "args": [],
    "env": {

    }
  }]
}

守护进程

npm install -g pm2

启动

pm2 start pm2.json

自启动

pm2 startup
pm2 save

一键安装(未测试)

curl -sSL https://prod.download/firekylin-install | bash

Valine 安装

配置 leancloud

https://leancloud.cn

HTML

<div id="comments"></div>
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  <script>
    new Valine({
    el: '#comments' ,
    notify:false, 
    verify:false, 
    app_id: 'rPIsxbDBCKfakeBf8UnMuV3E-fakeoHsz',
    app_key: '9YttffakewnTiPfakeMeEXjg',
    placeholder: 'ヾノ≧∀≦)o来啊,快活啊!',
    path:window.location.pathname, 
    avatar:'gg' 
    });
  </script>

Valine 后续

https://panjunwen.com/diy-a-comment-system/

FireKylin 讨论

https://gitter.im/firekylin/firekylin

评论加载中...