Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define the port? #684

Open
kikky7 opened this issue Nov 15, 2024 · 1 comment
Open

How to define the port? #684

kikky7 opened this issue Nov 15, 2024 · 1 comment

Comments

@kikky7
Copy link

kikky7 commented Nov 15, 2024

The default port used by SSR is 13714.

How to change it?

I use Laravel Forge and I have 2 sites on same server, both using Inertia and SSR. When I enable Inertia SSR via Forge for 2nd site, it starts at same port and kills the SSR of first site.

It's same in local development, when I run both commands to starts SSR php artisan inertia:start-ssr, the other one gets killed.

I can't find any docs in Inertia or Laravel docs how to update the port.

@RobertBoes
Copy link
Contributor

You'd have to update the config on where to find the server;

'url' => 'http://127.0.0.1:13714',

To run it on a different port you pass it to createServer as the second parameter; https://github.com/inertiajs/inertia/blob/9106d74495130a3d82d00daec43c4042b81bdb63/packages/core/src/server.ts#L16 in your ssr.js file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants