I have released my convex kubernetes operator under the GPL-3 license.
Give it a try, send feedback.
Webentwicklungg, Programmieren, Software, Server… irgendwie alles was in den Bereich Computer und Entwicklung fällt
Anything regarding web-development
I have released my convex kubernetes operator under the GPL-3 license.
Give it a try, send feedback.
I asked in the graphql discord server #relay channel, what people used to build their graphql relay style backends.
Here I’ll list the responses.
Language: Go
Toolkit: gqlgen with ent and entgql extension
I made a starter package one can clone and adapt. It uses openid-connect for authentication and postgresql as the data storage. It can also use sqlite in-memory for development purposes.
https://github.com/dlukt/graphql-backend-starter
Language: Scala
Toolkit: Caliban
Language: Node.js
Toolkit: Pothos
Another member of the graphql discord server created a starter package with Prisma, Pothos and Better Auth.
https://github.com/nkzw-tech/server-template
Language: Python
Toolkit: Strawberry GraphQL
Language: Elixir/Phoenix
Toolkit: Absinthe
Language: C#/.net
Toolkit: Chillicream
If you know more, please comment and I’ll extend the post
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
|
1 2 |
VITE_HTTP_ENDPOINT=http://localhost:8080/api/v1 VITE_OIDC_AUTHORITY=https://my.id.domain.tld |
and you can access those variables with e.g.
|
1 2 |
const httpEndpoint = import.meta.env.VITE_HTTP_ENDPOINT const oidcAuthority = import.meta.env.VITE_OIDC_AUTHORITY |
but this also gives you access to other variables, which are present by default
|
1 2 3 4 5 6 7 |
{ BASE_URL: '/', DEV: true, MODE: 'development', PROD: false, SSR: true, } |
Playing with Flowbite React and their Datepicker component, I had data coming from the backend in this or similar form:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
{ "data": { "posts": { "edges": [ { "node": { "id": "c57e4ea8-072e-4057-974f-bfb369504a57", "createdAt": "2024-10-24T12:21:20Z", "updatedAt": "2024-10-24T14:03:16Z", "title": "Jobangebot mit jemand ohne Namen", "body": "Dies ist ein Jobangebot von jemandem ohne Namen", "expires": true, "expireTime": "2024-10-31T23:00:00Z", "category": { "id": "df84950d-742b-4d07-9f11-04b8964bcb36", "title": "Jobangebote" }, "profile": { "id": "0ce6ee59-4ebf-42cf-9c3a-69cf5e826b0b", "sub": "288686157058342913", "name": "" } } } ] } } } |
aka
|
1 |
"expireTime": "2024-10-31T23:00:00Z", |
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
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
type AdminPostEditFormValues = { title: string, body: string, expires: boolean, expireTime: Date, } const {control, handleSubmit, watch, formState: {errors}} = useForm<AdminPostEditFormValues>({ defaultValues: { title: data?.posts?.edges[0]?.node?.title, body: data?.posts?.edges[0]?.node?.body, expires: data?.posts?.edges[0]?.node?.expires, expireTime: dayjs(data?.posts?.edges[0]?.node?.expireTime).toDate() || dayjs().toDate(), } }) |
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).
|
1 |
expireTime: dayjs(data?.posts?.edges[0]?.node?.expireTime).toDate() || dayjs().toDate(), |
TL;DR: Parse the date value coming from the backend into a Date object. e.g.
|
1 |
Date.parse("2024-10-31T23:00:00Z") |
https://kamal-deploy.org/
https://github.com/basecamp/kamal
+:
No central management interface needed, per project configuration
-;
Uses “kamal-proxy”, not nginx. Kamal-proxy is written in Go and significantly slowerthan nginx, as is Traefic and Caddy.
https://coolify.io
https://github.com/coollabsio/coolify
+:
Nice looking UI and has continuous integration
-:
Requires 2CPU 2GB RAM and 30GB per node for the UI alone.
https://caprover.com
https://github.com/caprover/caprover
https://dokku.com/
https://github.com/dokku/dokku