Sid
Sid
Explore posts from servers
RRailway
Created by Sid on 9/11/2024 in #✋|help
What port does railway expose for node apps?
I have a very simple express app, I have it in a monorepo just to test some stuff, it builds fine, it starts fine, but I get the "application failed to respond" error when going to it on the provided domain I'm logging all traffic, and I can see that I'm not getting any when navigating to the domain I've tested the build locally, and it builds and starts just fine Any ideas?
import express from "express";
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const app = express();
const PORT = 3000;

app.use(express.static(path.join(__dirname, "dist")));

app.get("*", (req, res) => {
console.log("Request made: ", req.path);
res.sendFile(path.join(__dirname, "dist", "index.html"));
});

app
.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
})
.on("error", (err) => {
console.log(`Error: ${err}`);

process.exit(1);
});
import express from "express";
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const app = express();
const PORT = 3000;

app.use(express.static(path.join(__dirname, "dist")));

app.get("*", (req, res) => {
console.log("Request made: ", req.path);
res.sendFile(path.join(__dirname, "dist", "index.html"));
});

app
.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
})
.on("error", (err) => {
console.log(`Error: ${err}`);

process.exit(1);
});
12 replies
RRailway
Created by Sid on 9/10/2024 in #✋|help
Build fails with: ts-node: not found
No description
43 replies
RRailway
Created by Sid on 4/24/2024 in #✋|help
Is there any way to override environment variables locally?
With railway run, you get all of the environment variables for that service, but is there anyway to override some of them before running the command?
4 replies
RRailway
Created by Sid on 4/17/2024 in #✋|help
TLS certificate has taken over 24 hours for a custom domain
No description
8 replies
RRailway
Created by Sid on 1/31/2024 in #✋|help
Can we determine the sequence of deployments?
I'm using Turborepo and I want to make sure my backend is deployed before my frontend, pushing to the repo will kick of both services to deploy at the same time. Is there any way to configure this?
21 replies
RRailway
Created by Sid on 1/31/2024 in #✋|help
How to set up a staging -> production workflow?
I'm trying to set up a workflow whereby a push to master will build and auto deploy to our staging environment on railway but not autodeploy on our production environment until we approve the staging environment works correctly. How can I go about doing this in railway? The docs show a "disable trigger" button but the UI has changed, and I can't find a "deploy" button anywhere
15 replies