Closed JackyChiu closed 6 years ago
Maybe we should move all the AddRoute declaration in main.go and pass the router to ListenAndServe ?
@guillaumemaka I like the idea of that since our "router builder" methods aren't really doing any specific logic. I'll do it in another PR
Another thing I'd like is to do is abstract the router to its own package (do you think middleware should go along with it?)
make sense to abstract the router and for middlewares we need a way to pass the DB and JWT interface that's currently available through the Handler struct, or maybe we could move DB, JWT and Logger to the router struct or make them available globally (not sure it's a good approach)
@guillaumemaka this is still a "work in progress" btw
@JackyChiu I know. What's your current progress ? I'm currently working on the comments routes and the Gin implementation.
I've been cleaning some stuff up, and will finish the users route sometime later this week or weekend
Maybe we should move all the AddRoute declaration in main.go and pass the router to ListenAndServe ?