devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Remix nodejs+postgres example

Open frontsideair opened this issue 1 year ago • 13 comments

I created a basic Remix example that uses PostgreSQL.

I couldn't find a simple enough full-stack Remix template so I created my own. It can be regularly rebased on top of the official default template, and I feel comfortable about transferring repo ownership to cachix organization.

The test seems to be passing on my machine, but I'm open to improvements. I based everything on Ruby on Rails example and my own experimental project where I started using devenv.

A Next.js example can be built based on this relatively easily if needed.

frontsideair avatar Jan 23 '24 06:01 frontsideair

@domenkozar I cleaned the create-remix output a bit.

There are many failing tests, at least one is because of prisma dependency on libssl. I could simplify the template to use PostgreSQL with a simpler library, but this is a pretty typical Remix setup so it has testing and example value.

Especially since the docker compose setup I replaced had binary incompatibilities between native macOS I'm using and the docker linux environment caused by Prisma, which worked with devenv out of the box.

frontsideair avatar Jan 23 '24 11:01 frontsideair

Would be great to fix the tests so it can be merged.

domenkozar avatar Feb 17 '24 07:02 domenkozar

I would find some direction immensely helpful, as there are 71 tests failing and many of them are not related to this PR as far as I can tell. Would rebasing on main help? And the question about Prisma dependency on libssl remains, which solution would you recommend?

frontsideair avatar Feb 17 '24 07:02 frontsideair

Ideally we'd fix prisma in nixpkgs so that it works.

domenkozar avatar Mar 01 '24 03:03 domenkozar

I rebased my changes in case it helps. I'd be really happy to get this merged, I plan to write a blog post about using devenv to manage dependencies for a Node.js project and it'd be nice to have an official example in place for that.

frontsideair avatar Mar 01 '24 22:03 frontsideair

@frontsideair happy to merge once tests pass, can you make sure those work?

domenkozar avatar Mar 02 '24 04:03 domenkozar

I think I fixed them @domenkozar, running devenv shell devenv-test-example remix locally passes.

frontsideair avatar Mar 10 '24 08:03 frontsideair

Every test is failing for a separate reason, one failing because of libssl, one is getting 403 from GitHub, two because they can't find npm. I'm very much lost.

frontsideair avatar Mar 10 '24 10:03 frontsideair

I'm currently focusing effort to get #1005 out, once it's done I can help you take a look.

domenkozar avatar Mar 11 '24 08:03 domenkozar

@frontsideair hey, can you rebase and see where we're at?

domenkozar avatar Apr 15 '24 06:04 domenkozar

@domenkozar Rebased, thanks for keeping tabs on this!

frontsideair avatar Apr 17 '24 09:04 frontsideair