R
Railway3y ago
Faiz

Is there a way to see connection logs?

I'm transitioning from Heroku and in the Heroku logs they would log every time my Node endpoint was hit. For example:
2022-09-22T20:34:46.000Z at=info method=GET path="/something/?page=1" host=my-host.herokuapp.com request_id=f50d6e2b-3996-4c2b-927a-9481df2f39e2 fwd="ip.add.re.ss" dyno=web.1 connect=0ms service=331ms status=200 bytes=16681 protocol=https
2022-09-22T20:34:46.000Z at=info method=GET path="/something/?page=1" host=my-host.herokuapp.com request_id=f50d6e2b-3996-4c2b-927a-9481df2f39e2 fwd="ip.add.re.ss" dyno=web.1 connect=0ms service=331ms status=200 bytes=16681 protocol=https
I don't see that on the Railway logging. The only thing that's been logged is
Running my-app on 0.0.0.0:7819
Running my-app on 0.0.0.0:7819
5 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Faiz
FaizOP3y ago
Dang, that's sad to hear. Any plans to implement this in the future?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Faraz
Faraz3y ago
You should be able to do this by adding some sort of middleware to your application, no?
Faiz
FaizOP3y ago
Never considered looking for one! Express's native morgan middleware does the trick--thanks! Though for repos that don't use Express, this functionality would still be useful! (e.g. https://github.com/Rob--W/cors-anywhere)
Want results from more Discord servers?
Add your server