How to start keystone in a sub-path in embedded next.js app?
See original GitHub issueHow to reproduce the problem
How can I start keystone app on sub-folder instead of root? For example I have mydomain.it
with next.js app and I would like to map keystone app to mydomain.it/admin
. I’m using ExtendExpressApp in keystone config but it works after the server started and I need to work before the server starts. Is there another way?
What I’m expecting
I’m expecting to start keystone app to mydomain.it/admin
to avoid an eaddrinuse error as below.
Screenshot
Contextual informations
- I’m using keystone embedded nextjs app
- nextjs app run on mydomain.it and I would like to start keystone app on mydomain.it/admin instead of repeating it on mydomain.it and this is why the eaddrinuse error
- node v18.12.1 + chrome@latest
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
How to embed Keystone + SQLite in a Next.js app
In this tutorial, we're going to show you how to embed Keystone and an SQLite database into a Next.js app. By the end,...
Read more >Issues · keystonejs/keystone - GitHub
The most powerful headless CMS for Node.js — built with GraphQL and React - Issues ... How to start keystone in a sub-path...
Read more >Base Path - next.config.js
To deploy a Next.js application under a sub-path of a domain you can use the ... For example, to use /docs instead of...
Read more >How do I embed next.js with material-ui into keystonejs?
I'm trying to embed nextjs with material-ui into keystonejs. I can get keystone to play nice with nextjs, ...
Read more >Build A Website with Keystone Next And Next.js | by Hussain Arif
Configure your database; Set up your back-end; Code your fields and their corresponding schemas for your GraphQL API; Later, build the query and ......
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
@flexdinesh that was why I asked my original question, they are running two applications haha
I’m setting up my environment with the route proxy atm and it is the best solution for a number of reasons, including flexible scaling, split deployments etc etc.
Your end-users won’t notice the diference and it’ll take a lot of complexity out of the solution.
It does push you towards the setup of a Monorepo environment though and there are still a few known issues with in Keystone.
Hi everyone, in my opinion I detected the problem!
Look at this article: https://keystonejs.com/blog/embedded-mode-with-sqlite-nextjs#add-keystone-to-next-js-config
In the article above, it’s explained how to build an embedded app, but the withKeystone funcion should be modified because in this version (embedded) in my opinion the withKeystone that starts the keystone app should run under a sub-path.
What do you think about it? Is it possible to plan this update or similar?