keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Missing documentation on how to change default port from CLI

Open machineghost opened this issue 3 years ago • 1 comments

This, link (NOTE: Github is messing up this link if I provide it: it's supposed to be https://github.com/keystonejs/keystone/discussions/ + 7696, but it somehow turns into a pull request link), got turned into a discussion. However, it's still an issue, and the issue is that the way to run Keystone on another port isn't provided anywhere within the documentation.

This should be a trivial addition.

machineghost avatar Jul 09 '22 14:07 machineghost

The relevant part of keystone dev and keystone start, two CLI scripts provided by Keystone https://github.com/keystonejs/keystone/blob/24c59baff3db26c4f2425994237bb440e0820b00/packages/core/src/scripts/run/dev.ts#L234

https://github.com/keystonejs/keystone/blob/24c59baff3db26c4f2425994237bb440e0820b00/packages/core/src/scripts/run/start.ts#L47

The relevant documentation

https://github.com/keystonejs/keystone/blob/24c59baff3db26c4f2425994237bb440e0820b00/docs/pages/docs/apis/config.mdx#L211

The nuance here is that this behaviour is only part of the provided keystone CLI scripts, if you don't use them, this isn't inherently part of the Keystone core.

Pull requests welcome! :blue_heart:

dcousens avatar Jul 09 '22 23:07 dcousens

I don't think we want to encourage process.env.PORT from our keystone * scripts, as you should be configuring this yourself in your own Keystone configuration - but for now it is there

dcousens avatar Aug 24 '23 10:08 dcousens