question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.4] Custom express instance no longer works

See original GitHub issue

In 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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JedWatsoncommented, May 13, 2016

Fixed by #2839

1reaction
JedWatsoncommented, Apr 16, 2016

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 and express.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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found