-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify custom servers from within the index.js file
- Loading branch information
1 parent
be7a106
commit 290ee01
Showing
71 changed files
with
635 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"releases": [ | ||
{ "name": "@keystone-alpha/api-tests", "type": "patch" }, | ||
{ "name": "@keystone-alpha/demo-project-blog", "type": "minor" }, | ||
{ "name": "@keystone-alpha/demo-project-meetup", "type": "minor" }, | ||
{ "name": "@keystone-alpha/demo-project-todo", "type": "minor" }, | ||
{ "name": "@keystone-alpha/admin-ui", "type": "major" }, | ||
{ "name": "@keystone-alpha/core", "type": "major" }, | ||
{ "name": "create-keystone-app", "type": "minor" }, | ||
{ "name": "@keystone-alpha/fields-wysiwyg-tinymce", "type": "major" }, | ||
{ "name": "@keystone-alpha/keystone", "type": "major" }, | ||
{ "name": "@keystone-alpha/server-graphql", "type": "major" }, | ||
{ "name": "@keystone-alpha/server-next", "type": "major" }, | ||
{ "name": "@keystone-alpha/server-static", "type": "major" }, | ||
{ "name": "@keystone-alpha/test-utils", "type": "patch" }, | ||
{ "name": "@keystone-alpha/cypress-project-access-control", "type": "minor" }, | ||
{ "name": "@keystone-alpha/cypress-project-basic", "type": "minor" }, | ||
{ "name": "@keystone-alpha/cypress-project-login", "type": "minor" }, | ||
{ "name": "@keystone-alpha/cypress-project-social-login", "type": "minor" } | ||
], | ||
"dependents": [ | ||
{ | ||
"name": "@keystone-alpha/adapter-knex", | ||
"type": "patch", | ||
"dependencies": ["@keystone-alpha/keystone"] | ||
}, | ||
{ | ||
"name": "@keystone-alpha/adapter-mongoose", | ||
"type": "patch", | ||
"dependencies": ["@keystone-alpha/keystone"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Specify custom servers from within the index.js file | ||
- Major Changes: | ||
- The `index.js` export for `admin` must now be exported in the `servers` | ||
array: | ||
```diff | ||
module.exports = { | ||
keystone, | ||
- admin, | ||
+ servers: [admin], | ||
} | ||
``` | ||
- The `keystone.prepare()` method (often used within a _Custom Server_ | ||
`server.js`) no longer returns a `server`, it now returns a `middlewares` | ||
array: | ||
```diff | ||
+const express = require('express'); | ||
const port = 3000; | ||
keystone.prepare({ port }) | ||
- .then(async ({ server, keystone: keystoneApp }) => { | ||
+ .then(async ({ middlewares, keystone: keystoneApp }) => { | ||
await keystoneApp.connect(); | ||
- await server.start(); | ||
+ const app = express(); | ||
+ app.use(middlewares); | ||
+ app.listen(port) | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.