Skip to content

Commit 41f6a71

Browse files
committed
fix: Add gridsome.server.js example
1 parent a8bf4c1 commit 41f6a71

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gridsome.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// This is where project configuration and installed plugin options are located.
1+
// This is where project configuration and plugin options are located.
22
// Learn more: https://gridsome.org/docs/config
33

4-
// Changes here requires a server restart to work properly.
4+
// Changes here requires a server restart.
55
// To restart press CTRL + C in terminal and run `gridsome develop`
66

77
module.exports = {

gridsome.server.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Server API makes it possible to hook into various parts of Gridsome
2+
// on server-side and add custom data to the GraphQL data layer.
3+
// Learn more: https://gridsome.org/docs/server-api
4+
5+
// Changes here requires a server restart.
6+
// To restart press CTRL + C in terminal and run `gridsome develop`
7+
8+
module.exports = function (api) {
9+
api.loadSource(store => {
10+
// Use the Data store API here: https://gridsome.org/docs/data-store-api
11+
})
12+
}

0 commit comments

Comments
 (0)