How does Express node.js route requests to the following links

  node.js, question

abc.morefungame.com

Abc is the name of a jade file
 Morefungame.com is a domain name

How does this match?

You want to use Second-level domain to access a page,First of all, this is not recommended.. Of course, the demand is very strange ~ ~ ~ ~

Scheme:

  1. Intercept at route entrancerequest.urlIntercept abc and jump accordingly

  2. If there are not many such special pages, you can use thenginxLevel to do a reverse proxy, forabc.morefungame.comJump to the corresponding processing route such aswww.morefungame.com/abc