Remix JS: Does Remix use process.env or import.meta.env?

Does Remix use vite’s import.meta.env or process.env?

The answer is, both. However it’s better to rely on vite’s import.meta.env because of 2 things:
1. Only VITE_ prefixed environment variables are imported
2. It’s also available in the non-SSR context, while process.env is a NODE thing only and not propagated to the browser.

So what does that mean?

You can have a
.env.development
and a
.env.production
file in the project root and add things like

and you can access those variables with e.g.

but this also gives you access to other variables, which are present by default

Kleinanzeigen Kreis Göppingen

Die letzten Tage habe ich an einer Kleinanzeigenplatform für den Kreis Göppingen gearbeitet.

Sie wurde mit ent, gqlgen, mysql im Backend und react mit vite und relay, flowbite UI und tailwindcss im Frontend geschrieben. Als Authentifizierung nutzt sie Zitadel als OIDC IDP.

Man kann sie finden unter:
Kleinanzeigen Kreis Göppingen

Uncaught RangeError: date value is not finite in DateTimeFormat.format()

Playing with Flowbite React and their Datepicker component, I had data coming from the backend in this or similar form:

aka

React is a bit of a cringy special child. Angular, no problemo. Vue, no problemo.
Anyhow.

I have to set defaultValues in a React-hook-form form, because React is special with controlled and uncontrolled components.
aka

So, I’m using dayjs for my date/time stuff, and this line essentially means, parse the Date before assigning it to a form value (or create a new Date(), because React and controlled/uncontrolled forms is not a happy story).

TL;DR: Parse the date value coming from the backend into a Date object. e.g.

Letsencrypt wildcard subdomains

It’s not easy to find proper search results for this topic.

You have a domain and would like to have wildcard subdomains but are not a customer of the prominent cloud providers aka your domain reseller or DNS provider isn’t supported.

Prerequisite:
We already have a *.domain.tld DNS record pointing to our server with certbot installed.

The command is

You run this command, then you have to add a TXT record to your DNS zone.
Something like

as the key.
The trailing dot (.) is required.
And the value you receive from the command as well.
Then wait until it’s updated in the DNS, you can check if it was with

.

And then you just hit ENTER in the console and it should be completed.

I’ll now add a wildcard nginx configuration for ZITADEL, which is an web based identity management software.