R
Railway14mo ago
ossset

Not starting with custom location of main.go file

Can't start server on railway - main.go file is location in {project_root}/cmd/{module_name}/main.go I've tried to add custom build command of go build ./cmd/{module_name}/main.go but it didn't help.
No description
Solution:
go build ./... you can easily set the build and start command in a railway.json file the start command is needed since your path results in a built binary named auth-ms instead of out like railway expects ```json {...
Jump to solution
4 Replies
Percy
Percy14mo ago
Project ID: N/A
ossset
osssetOP14mo ago
N/A
Solution
Brody
Brody14mo ago
go build ./... you can easily set the build and start command in a railway.json file the start command is needed since your path results in a built binary named auth-ms instead of out like railway expects
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"buildCommand": "go build ./..."
},
"deploy": {
"startCommand": "./auth-ms"
}
}
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"buildCommand": "go build ./..."
},
"deploy": {
"startCommand": "./auth-ms"
}
}
Brody
Brody14mo ago
tagging @ossset for visibility
Want results from more Discord servers?
Add your server