Use Gorm And Gorilla/Mux or Standard Library?

Hey Guys,
I use Gorm and Gorilla/Mux for my shopping project (with Postgres database). and now I have user and product sections. I want to start the login and profile part and JWT token and some security. my project every day becomes grower and I’m worried about the near future about clean code for Testing and Extensibility. I must continue using gorm and mux or now before more coding switches my code to Standard Library?

2 Likes

I do not want to reinvent the wheel or do so again and I don’t want make project complex and hard for Testing and Extensibility. I feel like I’m at a crossroads and need to figure out the right way to proceed

2 Likes

Since your project is growing “every day”, look at go-chi/chi.

Chi is lightweight and designed for modular/composable API so your project can grow easily.

I used chi in production for a mission-critical project and it worked well.

You mentioned JWT, so JWT authentication middleware (go-chi/jwtauth) could be useful. Use middleware that is 100% compatible with net/http if possible.

I’m using gorilla/mux with gorilla/sessions for a webauthn server demo (fxamacker/webauthn-demo) – maybe that combo can fill the gap until you migrate to something like chi.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.