R
Railway2y ago
Chen

How does it work under the hood when I deploy a NextJS app with serverless functions?

I've deployed a Next13 app router project to Railway, and it worked surprisingly well without any hiccups.(funny, i can't seem to deploy to vercel for) So Vercel takes the API routes and turns them into serverless functions, I"m not too familiar with how that works under the hood. To my understanding, Railway does not do that, so what's happening under the hood? Is there a persistent express server or something?
11 Replies
Percy
Percy2y ago
Project ID: N/A
Chen
ChenOP2y ago
N/A
Brody
Brody2y ago
its just a docker image that runs 24/7, your code is not modified in any way what so ever, the default next start command is next start and that is what railway will run
Chen
ChenOP2y ago
oh i see, so it's as if my computer is running the code
Brody
Brody2y ago
i guess you could put it that way i dont know what type of server next start runs, so if you want to dig deeper you could probably read the next docs
Chen
ChenOP2y ago
side question, but how does "projects" in the dashboard vs each block in each project differ? is it mostly just for organization? or do my 2 blocks in the project share a computer?
Brody
Brody2y ago
yeah projects in the dashboard would be for separate projects. blocks inside the projects, or their proper names, services and plugins are for everything that specific project needs, like backend, frontend, database, etc. all the services and plugins would be on the same host (fancy term for computer (virtual machine)) and the services can communicate with each other internally via the private network
Chen
ChenOP2y ago
i see i see! thank you! that clears things up for me :)
Brody
Brody2y ago
no problem, any other questions?
Chen
ChenOP2y ago
no i think that's good for now!
Brody
Brody2y ago
awsome!
Want results from more Discord servers?
Add your server