by erokar · 8y ago · 0 comments
In Next you've had to either set up and configure nginx locally or proxia via an Express server, both options that that are a bit of a hassle to set up for such a common case.
In development you'd use micro-proxy [2] and define a rules-dev.json with local mappings, and then have a package.json script to fire up that proxy for local testing.
That way ypu can use django sessions, authentication, login, admin, etc.
The node server just does rendering, and creates client side JS based on data it is given by Django.
It took 25 lines of code, yes, but pretty much worth it if you have a long term project like a single app that your company is built around.