Test wildcard domains


Hi, I am trying to test my express app with vhost for subdomain support. The issue is that the /etc/hosts file does not support regex to route say *.localhost.com to I installed the popular dns server dnsmasq to acquire regex support but I am unable to get it working, and I believe it has to do with the lack of a proper configuration. The dnsmasq address flag was enabled and set to /localhost/, I then created an entry within /etc/host *.localhost.com and then in my app I’m listening on process.env.PORT and process.env.IP but no requests show up.


You do not need to reconfigure localhost since your project still runs on <username>-<projectname>.c9.io
Her’s an example of using subdomains with node http server How to host multiple websites in one server