PERFORMANCE

Real World Performance: lazy loading, optimizing media, faster analytics join us Wednesday

ContactSign Up
Community Plugin
View plugin on GitHub

Gatsby Plugin Express

Introduction

Gatsby plugin for easy integration with Express. gatsby-plugin-express gives you a way to integrate your Gatsby site with a Node.js server using Fastify. Use to serve a standard Gatsby.js site normally - the plugin will take care of everything:

routes

limited support)

  • Path prefix, Etags, and more.

Installation

Install the plugin using npm or yarn

npm i @syfxlin/gatsby-plugin-express express

And add it to your gatsby-config.js

module.exports = {
    /* Site config */
    plugins: [
        {
            resolve: `@syfxlin/gatsby-plugin-express`,
        },
    ],
};

Serving your site

This plugin implements a server that’s ready to go. To use this you can configure a start(or whatever you prefer) command in your package.json:

{
  "scripts": {
    "start": "gserve"
  }
}
© 2023 Gatsby, Inc.