Repository navigation
Option to create the HTTP server in keystone start
#10095
nigrosimone
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
createExpressServeralways builds the server withhttp.createServer(app). I would like an option to create it, something like:The use case: fulmine.js (Express 5 API on uWebSockets.js, I maintain it). With an npm override (
"express": "npm:fulmine.js@^5") Keystone 8.3 already runs on it, and the GraphQL API gives the same answers as on Express. But Keystone wraps the app in a Node.js server, so the requests go throughnode:httpand not through uWebSockets.js. A fulmine.js app is also its own server (listen,close,address, events), so withcreateServer: (app) => appit listens by itself. I tried this by hand with Keystone 8.3 and fulmine.js 5.33.2, and it works.extendHttpServerwould get the returned server, and the same option also lets other users start an HTTPS server.It is a small change in
createExpressServerand in the types. If you are open to it, I can send a PR.Related: #7239 (using the Keystone app in another server) and #8995 (exposing the app and the server from
start).All reactions