circles
circles
TTCTheo's Typesafe Cult
Created by circles on 4/26/2023 in #questions
Nodemailer SMTP Emails are not being sent in production.
Just to note I'm deploying my t3 application on my own server, I'm not using Vercel. I have confirmed that my env vars are present and good. My problem is that mails via smtp transporter on nodemailer are not being sent in production, while locally they work fine with the same setup. Any help?
3 replies
TTCTheo's Typesafe Cult
Created by circles on 2/9/2023 in #questions
What's the best way to synchronize the DB Schema when using T3 Stack with Prisma??
I'm using Docker to build my application in production and I'm unsure how to actually sync the schema with the database.
8 replies
TTCTheo's Typesafe Cult
Created by circles on 12/10/2022 in #questions
How to make MUI TimePicker use UTC? (I really need this help)
Hi guys, I've been killing myself trying to do this, and I would really appreciate it if someone could help me, because I'm going crazy and I have to do this asap.... I know a lot of you guys hate MUI, but if anyone can help me, please do. I'm using a time picker, and I need that time picker to always show time in UTC to be in sync with the backend etc. I'm using a dayjs adapter. This is my code:
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
value={value}
ampm={false}
minTime={minimumAcceptableTime()}
onChange={handleOnChange}
renderInput={(params) => <TextField {...params} />}
disabled={isTimePickerDisabled()}
/>
</LocalizationProvider>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
value={value}
ampm={false}
minTime={minimumAcceptableTime()}
onChange={handleOnChange}
renderInput={(params) => <TextField {...params} />}
disabled={isTimePickerDisabled()}
/>
</LocalizationProvider>
I tried using dayjs plugins to set current timezone as well, but no luck:
import utc from 'dayjs/plugin/utc'

import timezone from 'dayjs/plugin/timezone'

dayjs.extend(utc)

dayjs.extend(timezone)
dayjs.utc()
dayjs.tz.setDefault('Africa/Abidjan')
import utc from 'dayjs/plugin/utc'

import timezone from 'dayjs/plugin/timezone'

dayjs.extend(utc)

dayjs.extend(timezone)
dayjs.utc()
dayjs.tz.setDefault('Africa/Abidjan')
Always results in my current timezone (GMT+1):
Sat Dec 10 2022 15:15:00 GMT+0100 (Central European Standard Time)
Sat Dec 10 2022 15:15:00 GMT+0100 (Central European Standard Time)
If anyone can help, I'd really appreciate it, thanks.
3 replies
TTCTheo's Typesafe Cult
Created by circles on 11/21/2022 in #questions
How do you execute a command which includes special characters from within bash script?
Hi, I'm trying to execute this command from within a bash script, but I cannot seem to figure it out. Copy-pasting it manually works. Any help would be appreciated.
configure_gitlab_runner () {
'docker-compose exec gitlab-runner-container \\
gitlab-runner register \\
--non-interactive \\
--url "$gitlab_url" \\
--registration-token "$gitlab_registration_token" \\
--executor docker \\
--description "Gitlab Runner" \\
--docker-image "docker:stable" \\
--docker-volumes /var/run/docker.sock:/var/run/docker.sock'
}
configure_gitlab_runner () {
'docker-compose exec gitlab-runner-container \\
gitlab-runner register \\
--non-interactive \\
--url "$gitlab_url" \\
--registration-token "$gitlab_registration_token" \\
--executor docker \\
--description "Gitlab Runner" \\
--docker-image "docker:stable" \\
--docker-volumes /var/run/docker.sock:/var/run/docker.sock'
}
1 replies
TTCTheo's Typesafe Cult
Created by circles on 11/20/2022 in #questions
Is there an 'easy' way to expose tRPC function as an external REST API?
I'm just curious if there is a way to expose certain tRPC functions as a REST API. One of the reasons I'm asking this is, imagine you have built an application and now you might wanna sell (or expose it, don't have to sell it) your backend to other consumers.
3 replies
TTCTheo's Typesafe Cult
Created by circles on 11/18/2022 in #questions
What is the best approach to migrate to a new state management tool?
I have a project that I'm working on with bunch of people and redux is used for state management, it's kinda chaotic... What is the best way to migrate this thing to something more viable, like react query + zustand (if needed)? My initial approach would be to start implementing new features using react-query + zustand, and also integrating it when refactor of old code is needed. Is this the right thing, or is there some better option? (other than rewriting everything)
26 replies