Gridsome: Gridsome Serve Mode

Created on 23 May 2019  路  3Comments  路  Source: gridsome/gridsome

Gridsome Serve Mode

Gridsome has a command called gridsome serve that has been included from the beginning. This is not functioning properly yet, so this issue is highlighting what we want to achieve with it for Gridsome v1.0.

What is it?

A way to run Gridsome in SSR mode on a Node server with the GraphQL data layer included.

This is perfect for example instant previews for content editors working in Headless CMSs.

Why is it needed?

Gridsome generates static HTML that can be hosted on any Static web hosts.
This is great for speed, security and hosting costs. (And putting your entire site on a CDN).

But when you need to serve real-time data so, for example, content editors can preview changes instantly, you鈥檒l need to run on a Node server.

With gridsome serve you should be able to:

  • Setup a server for instant content previews (That content editors can use).
  • Run your Gridsome site on a node server with the GraphQL data layer included.
  • Update the GraphQL data layer from external services for instant data updates.
  • GraphQL sources that are stitched will be loaded from the original source.
enhancement

Most helpful comment

For those who want to use a preview already now: With Storyblok as headless CMS you have instant live preview without the need to spin up an additional server. The implementation is explained in the following tutorial: https://www.storyblok.com/tp/gridsome-multilanguage-website-tutorial

All 3 comments

For those who want to use a preview already now: With Storyblok as headless CMS you have instant live preview without the need to spin up an additional server. The implementation is explained in the following tutorial: https://www.storyblok.com/tp/gridsome-multilanguage-website-tutorial

@onefriendaday thank you for your share, but I want to hide these develop step, and only need to run Gridsome in a node server. Because use my product(maybe an editor) not a developer, just is a student, a writer and so on.

Anyone has made live preview with gridsome & sanity on production without any server need ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martifenosa picture martifenosa  路  3Comments

igregson picture igregson  路  3Comments

ameistad picture ameistad  路  3Comments

realtebo picture realtebo  路  3Comments

tomtev picture tomtev  路  3Comments