btraut
btraut
Explore posts from servers
TtRPC
Created by btraut on 1/17/2024 in #❓-help
trpc's useQuery with undefined input adds extra {"values":["undefined"]} to query
My React app has several calls to query endpoints that have no input data but that do need useQuery params:
const result = trpc.onboarding.activationSteps.useQuery(undefined, {
cacheTime: ms("10m"),
})
const result = trpc.onboarding.activationSteps.useQuery(undefined, {
cacheTime: ms("10m"),
})
These calls result in tRPC fetching the following: /trpc/onboarding.activationSteps?input={"json":null,"meta":{"values":["undefined"]}} I'd really like to avoid all the extra query param junk. Is there a way to leave this off and just call /trpc/onboarding.activationSteps?
2 replies
RRailway
Created by btraut on 11/25/2023 in #✋|help
Custom fonts via fontconfig
I'm trying to set up the sharp pacakge in nodejs to generate an image for me using text and a custom font. Their documentation says I need to install fontconfig which I've done via railway.toml. But once I have fontconfig installed, I'm not sure where to put font files. Is there some way to copy them to /usr/local/share/fonts from my repo? Are there any examples of fontconfig usage with railway projects?
4 replies
RRailway
Created by btraut on 5/11/2023 in #✋|help
Can't reach datadog agent
Hey folks! I'm trying to launch a datadog agent via docker on Railway. It works when I run it locally on my mac, but I can't seem to make requests to it when I launch it on railway. Is there something special I need to do with exposing ports? Here's the docker file:
FROM datadog/agent

ENV DD_APM_NON_LOCAL_TRAFFIC=true
ENV DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true

ARG DD_API_KEY
ARG DD_SITE
ARG DD_HOSTNAME

EXPOSE 8125/udp
EXPOSE 8126/udp
FROM datadog/agent

ENV DD_APM_NON_LOCAL_TRAFFIC=true
ENV DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true

ARG DD_API_KEY
ARG DD_SITE
ARG DD_HOSTNAME

EXPOSE 8125/udp
EXPOSE 8126/udp
I can confirm the agent starts just fine and seems to be checking for metrics. I just can't call it from the outside. Been trying like this (again, works locally): echo -n "rainmaker.backend.express.router.response_code.200:55|g|#shell" | nc -4u -w0 datadog-agent-production-2d86.up.railway.app 8125
7 replies