10 months ago
I have problem with my node.js server. All request error reques
tId:"icMJy7-oS-ufYmtlVICMGw_882434190"
timestamp:"2024-09-20 10:24:45.275642901"
method:"POST"
path:"/api/login"
host:"backend-production-4fc9.up.railway.app"
httpStatus:404
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/1.1"
responseDetails:""
totalDuration:133
upstreamAddress:"http://[fd12:7240:81db::93:c68c:b0b1]:8080"
clientUa:"PostmanRuntime/7.42.0"
upstreamRqDuration:133
txBytes:149
rxBytes:381
srcIp:"54.86.50.139"
edgeRegion:"us-east4"
PORT = https//:backend-production-4fc9.up.railway.app
const port = process.env.PORT || 8080;
app.use(cors());
app.use(express.json());
app.use("/api/auth", authRoutes);
app.use("/api/users", userRoutes);
app.listen(port, "0.0.0.0", () => {
console.log(`Example app listening on port ${port}`);
});
3 Replies
10 months ago
A 404 on the root path of an API is completely normal.
What is the actual issue you are experiencing?
10 months ago
The problem is that I expect a different response from the server when I make a request
to https://backend-production-4fc9.up.railway.app/api/login
10 months ago
In the code you showed above, you do not have a route handler for /api/login
Status changed to Solved brody • 10 months ago