Web Dev Cody
Web Dev Cody
Explore posts from servers
RRailway
Created by Web Dev Cody on 8/16/2024 in #✋|help
Feedback on Status Url
No description
27 replies
RRailway
Created by Web Dev Cody on 8/2/2024 in #✋|help
How to get Volume Data
I have an application where I'm using sqlite with a volume mount. At some point, I want to export the sqlite data or do analytics over it. What is the proper way to download that sqlite data from my volume mount and is that even possible in railway?
9 replies
RRailway
Created by Web Dev Cody on 7/29/2024 in #✋|help
Issue with Cloudflared Tunnels and Go
I currently have a lot of next.js applications already deployed to railway that use cloudflare tunnels and the internal hostname of the railway container.
I'm having an issue when trying to deploy a container with Go. I've tried setting the hostname to the internal container, but my site is not reachable. I'm wondering if anyone else has successfully deployed a go application to railway with cloudflare tunnels. I think it may be related to my scratch container in that maybe scratch can't resolve the DNS hostname due to missing binaries on the machine?
20 replies
RRailway
Created by Web Dev Cody on 7/15/2024 in #✋|help
App unreachable when using nextjs standalone when using cloudflare tunnels
I'm trying to build and deploy a next.js standalone app, so I provided a custom docker file. It works fine when I don't use cloudflare tunnels, but when I so my tunnel can't access the service. Any insight into this issue?
5 replies
DTDrizzle Team
Created by Web Dev Cody on 6/24/2024 in #help
invalid code in docs
I’m trying to run code similar to this from the drizzle docs but typescript does t even think “where” is a proper attritbute inside the with. Is this actually implemented? await db.query.posts.findMany({ where: (posts, { eq }) => (eq(posts.id, 1)), with: { comments: { where: (comments, { lt }) => lt(comments.createdAt, new Date()), }, }, });
1 replies
DTDrizzle Team
Created by Web Dev Cody on 5/10/2024 in #help
Drizzle kit time differences compared to sql query
No description
3 replies
DTDrizzle Team
Created by Web Dev Cody on 5/8/2024 in #help
Having to restart Next.js server after migration
Does anyone know why I often need to hard restart my next.js server after I run a drizzle db push? Is there a way to get next to automatically know I've changed the schema without hard resetting?
5 replies
RRailway
Created by Web Dev Cody on 5/1/2024 in #✋|help
Usage Reports not per month
No description
7 replies
RRailway
Created by Web Dev Cody on 4/29/2024 in #✋|help
Slow Image Push
No description
8 replies
RRailway
Created by Web Dev Cody on 3/22/2024 in #✋|help
If using the hard limit, will it destroy my database?
might be a dumb question, but if I set a hard limit of $10 and my account reaches it, will my database be destroyed and lose all my data, or will it just shut down?
10 replies
RRailway
Created by Web Dev Cody on 3/22/2024 in #✋|help
Is there a guide for how to setup cloudflare tunnels with railway?
I'm trying to follow what is listed out here, but I'm failing to understand this guide. I've deployed a next.js project on a railway project, and I've also deployed the cloudflared template, setup the token in the cloudflared image, but I'm lost trying to point cloudflare to access my running next app.
40 replies
DTDrizzle Team
Created by Web Dev Cody on 11/21/2023 in #help
A way to use the update function with existing value in row?
How do I do the following SQL UPDATE counts SET count = count + 1 WHERE id = 1 but with drizzle orm, such as await db.update(counts).set({ count: current_count + 1, }); is that even possible or is raw sql my only option?
3 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 7/3/2023 in #questions
App router question about Link
So, I have two pages. Page A has a <Link href="/b" />, Page B has a Math.random() called during the RSC run through. Page B also has a link back to page A. If I keep navigating between these pages, the Math.random is only ever called once. This is due to the soft navigation in next. How do I prevent or turn this off for a page? export const revalidate = 0 does nothing. I know I could manually do a router.replace then router.refresh, but that's very hacky obviously
10 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 5/2/2023 in #questions
tRPC suppressing server logs?
I noticed that when my tRPc mutation throws an error, the error is sent to the front end but nothing is logged from my server. Is there somewhere I need to update to print all exceptions?
8 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 2/27/2023 in #questions
has anyone successfully setup t3 with jest + rtl?
I'm getting a Error: Uncaught [TypeError: Cannot read properties of undefined (reading 'trpcState')] error when I try to setup my next page component.
1 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 2/23/2023 in #questions
tRPC response time sometimes takes very long
119 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 2/1/2023 in #questions
Type Errors when importing AppRouter from npm workspace TRPC server
3 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 1/28/2023 in #questions
Getting ts-jest to work with testing files that use the .env mjs files
I'm trying to write a unit test to verify some code. This code uses the t3 env variable which is setup in these .mjs files. When I run jest it keeps failing to import from "./schema.mjs". Does anyone have an example repo which has test working fine in this scenario?
10 replies
TTCTheo's Typesafe Cult
Created by Web Dev Cody on 1/25/2023 in #questions
Proper way to handle TRPC server errors on client?
I have some code that looks a little like this, but I'm not too sure what we should be putting in the catch for typing the error. I'm just using the default t3 stack error formatter. Is there a built in type for the client I can use that doesn't require me to JSON.parse the error object?
subscribe
.mutateAsync({
email: form.email,
})
.then(() => {
return router.push("/success");
})
.catch((err: Error) => {
const message = err.message;
const errors = JSON.parse(message) as {
message: string;
}[];
setError(
errors.length === 0
? "something went wrong =("
: errors[0]?.message ?? "something went wrong"
);
})
subscribe
.mutateAsync({
email: form.email,
})
.then(() => {
return router.push("/success");
})
.catch((err: Error) => {
const message = err.message;
const errors = JSON.parse(message) as {
message: string;
}[];
setError(
errors.length === 0
? "something went wrong =("
: errors[0]?.message ?? "something went wrong"
);
})
3 replies
RRailway
Created by Web Dev Cody on 10/19/2022 in #✋|help
Websocket Disconnecting After Time
I have a socket.io web socket server which I'm deploying to railway. After some random amount of time, the my connections are getting disconnected. This does not happen when I run this same code locally. It also doesn't happen when I use a digitalocean droplet. Anyone know what is going on that is railway specific with socket.io websockets disconnecting?
96 replies