Answer the question
In order to leave comments, you need to log in
How to create dynamic subdomains in node.js?
There is a project on the MEVN stack (mongo, express, vue, node) It was
necessary to create a subdomain for the user. For example namecompany.site.ru.
The name of the company (subdomain) is entered in the user's admin panel.
Answer the question
In order to leave comments, you need to log in
Configure nginx
A special name with a mask like “.example.org” matches both the exact name “example.org” and the mask “*.example.org”.
https://nginx.org/ru/docs/http/server_names.html
Add logic to your engine to handle subdomains.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question