R
Railwayā€¢7mo ago
coltonidle

How to use railway with monorepo?

I created a new project and essentially my server code is not at the top level, and instead is one directory down. How do I configure this with railway?
104 Replies
Percy
Percyā€¢7mo ago
Project ID: N/A
coltonidle
coltonidleā€¢7mo ago
N/A
coltonidle
coltonidleā€¢7mo ago
should have known there was going to be a setting for this. but in my defense... i did try to search for it and i got no hits. but of course i try now and its there in settings. šŸ¤¦ā€ā™‚ļø thanks Brody! I wonder if i have to move my custom nixpack.toml into the new root folder... hmmmm
Brody
Brodyā€¢7mo ago
you would likely have the nixpacks.toml in the subfolder and then set the location to it with the NIXPACKS_CONFIG_FILE variable
coltonidle
coltonidleā€¢7mo ago
thanks. just moved it to the subfolder, so I will give that a shot. still find it weird that variables cant be in version control (like PORT 8080)
Brody
Brodyā€¢7mo ago
wdym version control? like github?
coltonidle
coltonidleā€¢7mo ago
yeah
Brody
Brodyā€¢7mo ago
its a variable that controls the platform, so it needs to be set on the platform itself but side node, there would be no need for you to set a PORT variable yourself as long as your app listens on the automatically generated PORT variable
coltonidle
coltonidleā€¢7mo ago
oh hmmm. i wonder if i can do that on ktor. i guess the auto generated port variable is set as an env variable?
Brody
Brodyā€¢7mo ago
yep it would be an environment variable, and yes you can do it with ktor, remove the PORT variable you set, now railway will randomly assign one behind the scenes, now all your app has to do is read the PORT environment variable and listen on it
coltonidle
coltonidleā€¢7mo ago
very cool. thanks for teaching. cant seem to get railway to use my /server directory. lmao
coltonidle
coltonidleā€¢7mo ago
No description
Brody
Brodyā€¢7mo ago
what makes you think that?
coltonidle
coltonidleā€¢7mo ago
No description
Want results from more Discord servers?
Add your server