Coder Social home page Coder Social logo

mineiro / now-ghost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cuulee/ghost

0.0 2.0 1.0 555 KB

Example deployment of a `ghost` blog to Now using npm

Home Page: https://now-examples-ghost.now.sh/

License: MIT License

JavaScript 8.15% CSS 53.63% HTML 38.21%

now-ghost's Introduction

Ghost

This repo demonstrates deployment of the Ghost blogging software to Now, using Ghost as an npm module.

How to deploy

First, download now. Then, clone this repository and run now:

$ git clone git://github.com/now-examples/ghost
$ cd ghost
$ npm install
$ NODE_ENV=development npm start
# make changes to your Ghost database locally before deploying
$ now

Example: https://now-examples-ghost.now.sh/

You can tweak the config.js file and content directory to your liking, and then re-deploy by running now again.

A note on Ghost database engines with Now

sqlite3

The file system on Now deployments is immutable. So knowing this, if you're going to stick with the default sqlite3 backend (which is file system based) then you should follow the typical Now-deployment paradigm. That is:

  • Start Ghost up locally in development mode: NODE_ENV=development npm start
  • Write a blog post and publish it so that the local sqlite database is updated
  • Create a new Now deployment and re-alias your URL

This paradigm requires a new deployment for any new blog posts or changes, and when upgrading Ghost.

mysql and postgres

If you want to use a mysql or postgres database service, then you'll have to update the config.js file to point to an externally hosted database. If you go this route then your Now deployment is more "live" such that you can edit and publish posts without creating a new Now deployment, so the workflow looks more like:

  • Edit the config.js file to point to your database server
  • Create a Now deployment and re-alias your URL
  • At this point you can go to the admin panel on your Now deploment URL and make desired changes

This paradigm requires a new deployment only when upgrading Ghost, or tweaking database settings.

now-ghost's People

Contributors

donmccurdy avatar tootallnate avatar

Watchers

 avatar  avatar

Forkers

enterstudio

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.