I have a node.js app that’s deployed on heroku. I use bootstrap in general and want to embed a blog into website. WordPress offers help for php only that I can’t use in junction with node on heroku. The solution is either to write another app in php (that I haven’t dealt with), deploy it again and bind it to website; or to look for some alternative blogging platform.
Requirements are not huge: I need a blog (ability to write/comment in plain text under the same domain name) with similar style to the website (currently it’s modern-business template).
The question is how would I go about it? If I choose WordPress, how should I deal with incompatibility issues? If it’s some alternative platform (eg. Ghost), what is the way to bind it to the website?
Answers with lines of code are greatly appreciated. Further clarification will be provided asap.
I will accept and plus answers that describe solutions.
It sounds like you want to find an off-the-shelf CMS compatible with Heroku.
Heroku has a read only filesystem, so you’re going to need to use a database-as-a-service to avoid redeploying each time you make content changes.
The Heroku Cedar stack means developers can install and run any language or service!
There are Heroku buildpacks for WordPress / PHP. Such as:
You’ll need to get all of your plugins and themes working locally before pushing. Heroku does not officially support PHP, so this is a little risky as you’re running precompiled versions of Nginx, PHP and WordPress from the buildpack’s author.
If you really want to use Node.js, there are a few CMS’s such as KeystoneJS, Ghost, Calipso, HatchJS, edamame and nodize.
You mentioned Ghost and how to “bind it to the website”. Wouldn’t you be better off running the entire site in the Ghost framework, rather than patching it onto an existing site? How big is your current Node.js app?
Another option is to use the database-less approach. Basically just a bunch of static files. You could have a simple Express app which would ingest Jade or Markdown templates. The downside to this is that every time you want to push new content, you’ll need to redeploy.
Is there any specific reason you’re trying to use the technologies listed? From glancing at the Heroku dev centre it doesn’t look like they support PHP, so you can’t use WordPress with Heroku. Also node.js is a Javascript server so I don’t see why you’d want to run another server to run PHP. Since you’re using node.js for the server, I’d suggest finding a blogging platform for node.js. Or drop node.js and Heroku to get a server that runs PHP to use WordPress.