Roy
Roy
TTCTheo's Typesafe Cult
Created by BootesVoid on 1/28/2024 in #questions
I have a standard data-table from shadcn
When you pass the columnFilters and columnVisibility state into the useReactTable hook, you can also pass a value for pagination like this { pageIndex: number, pageSize: number } which controls the pagination information. It might be more useful in your case to pass a value to the options called initialState like this { pagination: { pageIndex: 0, pageSize: 25 } }, so that this state is not controlled and can still be managed internally.
3 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
Thanks again for the direction
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
I like that option, it really doesn't need to be in front of the api. So I'll have caddy at mqtt.my-project.app to handle proxying the request to different ports on the mqtt service and I'll keep my standalone api service unaffected.
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
I've got to make a choice. I have an custom domain, my-project.app and right now have railway connected on two difference services to two different subdomains, specifically, mqtt.my-project.app and api.my-project.app. mqtt is going to have a reverse proxy to cover things like / - http, /ws - ws, /health - health check, /admin dashboard, and the api contains the other business logic (mainly uses trpc mounted at /trpc), but will also expose public graphql endpoints for a different piece. Do you think I'd be doing too much by having a caddy proxy in front of both so that there can continue to be a separation of concerns. Or would it be better to remove the mqtt sub domain entirely and just use one proxy to route all the relevant mqtt requests using a /mqtt/... prefix?
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
Gonna check it out right after I finish eating lunch and try deploying it - really appreciate the guidance!
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
I think I’ll checkout caddy, though nginx is something I do have experience with using before
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
proxy is pretty easy to see since it’s a private local network
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
Gotcha thanks for helping me out so quickly. Feel kinda dumb needing to ask that question… lol
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
So I have an express api also running in my project. If I add a route say /mqtt/health. I can make an internal request to the appropriate port and just forward that response?
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
Ohh I see, so the internal ports are still available to other services on the network?
23 replies
RRailway
Created by Roy on 9/8/2023 in #✋|help
Prebuilt Mqtt Service and Ports
40a3bc08-0c66-4f5e-a268-736ec53f0cac
23 replies