[0.4] Custom express instance no longer works
See original GitHub issueIn 0.4, settings keystone.app
or doing keystone.set('app', app)
where app
is your own express instance, prevents basic functionality (i.e. keystone admin) from mounting on the custom instance. This is a regression from 0.3.
The regression seems to be introduced here https://github.com/keystonejs/keystone/commit/2c2fab2641bec11616bfaa09fe4c8e2168a5fe94#diff-11403597a22b9bfded445849df6f58dbR48.
initExpressApp()
returns the express instance instantly if one has already been set by the user. This means that the logic that mounts the admin routes (and database connections, middleware setup etc etc) never gets executed.
I am currently working around this by manually calling the createApp
function:
keystone.app = app
keystone.start({
onHttpServerCreated: function () {
require('keystone/server/createApp')(keystone)
}
})
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
WebSphere Application Server Liberty 20.0.0.4 - IBM
IBM WebSphere Application Server Liberty Fix pack 20.0.0.4 for all platforms.
Read more >Plotly express in Python
The plotly.express module (usually imported as px ) contains functions that can create entire figures at once, and is referred to as Plotly...
Read more >MAIL EXPRESS v4.0.4 Installation, Administration, and User ...
enable Kerberos authentication in Mail Express. After installation and initial configuration have been completed, it is no longer required.
Read more >Troubleshooting DB issues for Amazon RDS Custom
After the restart, the RDS Custom agent detects that the DB instance is no longer in an unresponsive state. It then notifies the...
Read more >backstage/CHANGELOG.md at master - GitHub
80bfac5266: Updated the create-app command to no longer require Git to be installed ... Backend plugins can be upgraded to work with this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed by #2839
I think the documentation is out of date… this has been rewritten quite comprehensively, and tested in the keystone-test repo: https://github.com/keystonejs/keystone-test-project
See
keystone.js
,advanced.js
andexpress.js
for my test cases… if I have missed a test scenario, probably the best thing to do is add it there, and then PR keystone (or @mxstbr or I can help) to make it work.