#LoaderAction Function
1 messages · Page 1 of 1 (latest)
Hi, thank you for the response. Do you recommend any library?
or is there any remix example I can check regarding this? That would be more appreciated. 🙌 ❤️
I know this one https://www.npmjs.com/package/mysql2 but it hasn’t received an update in a long time
Ohh cool.. I will check this. Thank you.
Or https://www.npmjs.com/package/pg for postgresql
The latest release of that one is from 2 months ago
Yep.. I will check this. Thank you so much @simple jackal ❤️
Hello @simple jackal follow up question. Do you think it's a good idea to use Remix as your main Backend? I have Pure React frontend.
If yes, could you please explain why? If not, do you mind what do you recommend is the best practice? Thank you so much.
@steel narwhal In my opinion, we can use remix as a fullstack framework which means supporting your question. But anyways using a single codebase/framework for backend and frontend comes with it's cons such as maintaining the large project etc. If you're project is small enough to handle things from any point you can go with remix. I suggest you have a monorepo with any backend stack you can think of and use remix as a fully frontend tooling.
Either way if you love serverless and want to use platforms like vercel etc, go for remix it's the best of best to support serverless and frontend. It's just my opinion of using remix in different context.
If your alternative is to use Express and add your own libraries for everything else, I think Remix is better
But compared to backend focused frameworks like Rails, Nest, Laravel, Django, etc. I think those are better options right now
They come with more tools you will definitely need like how to do auth, i18n, send emails, an ORM, etc
Thank you for your insights... 🙌
@simple jackal do you think that remix as a backend will catch up in ergonomics / community togetherness and eventually be the better option?
Remix uses Express only when you use the Express adapter and the Remix App Server
If you deploy to Vercel or Netlify or Deno or Cloudflare there’s no Express
I think full time backend devs are probably going to keep using their frameworks, just because they are used to them
solid point
Do you think that a lot of the functionality of remix will move towards the direction of more standardized backend support stuff? There's a part of me that feels like proper controllers with HTTP method's and middleware, is really all that Remix would need to feel pretty ergonomic as a backend for most backend devs making REST API's.
Yeah, loader and actions and controllers
And React is the view
Remix don’t give you a model plus other services you may need
I hope Remix keeps adding more Frontend and Backend stuffs eventually
Like a mailer, background jobs, websocket server, validations, etc for backend and animations, UI components for common patterns (reach ui?) and more for Frontend
Hi. I'm a bit lost. So if I don't use the express adapter/remix app server. What backend framework does Remix running too? For ex. I want to use the loader/action function. Or should I use the express adapter to make it work? Hmmmm.
Remix is built to work as a request handler inside another server
if you use the Vercel adapter for example there's no Express, Remix integrates directly with Vercel
same with Cloudflare or Deno or Netlify
you could even build an adapter to integrate Remix directly into the Node http module without using Express
this is what allows Remix to be deployed basically everywhere even on different JS runtimes
it could be possible to run Remix inside a service worker too technically
btw you can use http methods on Remix, I recommend to only use GET and POST when dealing with forms but for resource routes you could use PATCH, PUT or DELETE too
you can install an ORM like Prisma
Ok.. So it will go down to ORM or as you suggest I can use library for my selected db.
@steel narwhal it's not hard to do it yourself. Maybe you can show what u have done so far? And we can try to guide you from there.