node.js - Deploy nodejs app to heroku -
node.js - Deploy nodejs app to heroku -
i used https://github.com/tommy351/hexo create blog , hope deploy heroku
hexo instruction
 installation  $ npm install hexo -g  quick start  setup blog  $ hexo init blog $ cd blog $ npm install  start server  $ hexo server  create new post  $ hexo new "hello hexo"  generate static files  $ hexo generate    i created @ local , upload app heroku , reported:
releasing testapp... ....done, v3    it looks ok, confuse how execute command line such as
hexo ***    on heroku
i executed
heroku run "hexo server"    it said
bash: hexo: command not found       
it's not way should deploy hexo on heroku.
1. tl;dr - short answerhexo doc(1) says should alter file ./_config.yml contains in part:
deploy:   type: heroku   repo: git@heroku.com:jefficue.git   message: deployment of hexo heroku.    bug current version (2): should delete public/ file ./gitignore. can check using bash command. should homecoming nothing:
$ cat .gitignore|grep public $    after should run next command @ project's root:
hexo generate hexo deploy    2. longer answer  if want execute on heroku command is
heroku run    in case seems hexo not installed on heroku. don't it add together bundle hexo dependencies:
{ "name":"hexo-site", "version":"2.8.3", "private":true, "dependencies":{ "hexo-renderer-ejs":"*", "hexo-renderer-stylus":"*", "hexo-renderer-marked":"*", "hexo":"*", "connect":"2.x" } }i've added bold line my./package.json , automatically installed during deployment. default bundle hexo not present. this bad practice add together it. should actually:
use hexo command locally, commit / force result server.(1) http://hexo.io/docs/deployment.html (2) https://github.com/hexojs/hexo/issues/764
 node.js heroku hexo 
 
Comments
Post a Comment