You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within a server.js file, it's possible to do this:
constkeystone=require('@keystone-alpha/core');keystone.prepare({ port }).then(async({ server,keystone: keystoneApp})=>{awaitserver.start();}).catch(error=>{console.error(error);process.exit(1);});
If you've got auth enabled, you'll then be able to see the Admin login page just fine, but wont be able to login.
Can you spot the error?
constkeystone=require('@keystone-alpha/core');keystone.prepare({ port }).then(async({ server,keystone: keystoneApp})=>{awaitkeystoneApp.connect();// Whoops, we forgot this line!awaitserver.start();}).catch(error=>{console.error(error);process.exit(1);});
We should throw an error (or warning?) if server.start() is called before keystone.connect() is called.
Or possibly throw the warning if any requests are made to any routes before keystone.connect is called.
The text was updated successfully, but these errors were encountered:
jesstelford
changed the title
Throw an error if keystone.connect not called before server.start
Throw an error if keystone.connect not called before queries made
May 30, 2019
This has changed slightly since the new Custom Servers don't have keystone.start() anymore, but the problem persists: making queries before keystone.connect() has complete should throw an error about not being connected.
It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)
Within a
server.js
file, it's possible to do this:If you've got auth enabled, you'll then be able to see the Admin login page just fine, but wont be able to login.
Can you spot the error?
We should throw an error (or warning?) if
server.start()
is called beforekeystone.connect()
is called.Or possibly throw the warning if any requests are made to any routes before keystone.connect is called.
The text was updated successfully, but these errors were encountered: