|
|
|
|
|
by CableNinja
1010 days ago
|
|
You couldve accomplished this at the webserver level, with way less hassle, and better performance. One would be complex rewrite rules. Another, is to use LUA with Openresty. And you dont need another node app, and you dont need the terrible performance you get with the node app, and you dont use a language meant for frontend things to do backend things. Seriously, what is it with every node dev using node for everything???? Yes, i know when all you know is a hammer, everything is a nail, but seriously, come on. There are plenty of better languages to have done this in, all of which are more performant for this type of thing, had you still decided to not use lua/rewrites. |
|
That's true, but only if you have access to your web server!
If you're using something like Vercel (or some other hosting service) to run your application, having a little middleware that handles subdomain routing is pretty common.
edit: Sorry if I've read this comment out of context - the linked repo has been taken down.