Coder Social home page Coder Social logo

Can't deploy hexo-admin about hexo-admin HOT 8 CLOSED

jaredly avatar jaredly commented on July 2, 2024
Can't deploy hexo-admin

from hexo-admin.

Comments (8)

jjalan avatar jjalan commented on July 2, 2024 2

I solved it as follows:

  1. Create index.js file in root directory of your project that contains the following:
var exec = require('child_process').exec;

var port = process.env.PORT || 4000;
var hexoServerProcess = exec("hexo server -p " + port);

hexoServerProcess.stdout.on('data', function(data) {
    console.log(data.toString()); 
});
  1. Add following line in package.json
"scripts": {
    "start": "node index.js"
  }
  1. Now deploy using (do not use hexo heroku plugin as it only deploy static pages)
git push heroku master

This assumes that you have added heroku as remote pointing to your heroku git.

Working link to my admin:
http://blog.trysquad.com/admin

Complete details (end to end):
http://blog.trysquad.com/2016/12/31/Easiest-way-to-start-hexo-blog-for-your-website/

from hexo-admin.

jaredly avatar jaredly commented on July 2, 2024

hmmm that ought to work. what's your heroku Procfile?

from hexo-admin.

juno249 avatar juno249 commented on July 2, 2024

when i deployed on localhost 0.0.0.0:4000/admin. Everything is ok. But on Heroku, for example: subdomain-heroku.herokuapp.com/admin. It's not work.

from hexo-admin.

jaredly avatar jaredly commented on July 2, 2024

and you're running locally w/ the Procfile? One possibliity is you're just using static files on heroku.

from hexo-admin.

huguiqi avatar huguiqi commented on July 2, 2024

Recently, i wanna to deploy my Blog with this plugin to Heroku too.tell me why?thanks...

from hexo-admin.

wykydtronik avatar wykydtronik commented on July 2, 2024

no documentation on how to configure deploy? I am using hexo-deployer-git - what do?

from hexo-admin.

jaredly avatar jaredly commented on July 2, 2024

@Kaichi @huguiqi there are two ways to deploy hexo: static pages or as a running server.

  • static pages: you run hexo generate locally, and then the resulting HTML & CSS files are hosted somewhere
  • running server: the host (like heroku) runs hexo server, and pages are generated dynamically

I personally recommend static pages, because it is much cheaper and more efficient. However, when using static pages, hexo-admin is not accessible from your website, but is only accessible locally.
If you are using a running server for your website, then hexo-admin will be available at e.g. example.com/admin, and you will be able to edit blog posts from the running server without having to redeploy.

Which scenario are you asking about?

from hexo-admin.

jaredly avatar jaredly commented on July 2, 2024

to deploy dynamically to heroku, I imagine you would just need a Procfile like

web: hexo server

and then deploy heroku normally, the way explained in https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction

from hexo-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.