Work in Progress!
A server to spawn and manage child-servers for diffrent subdomains
- Your child server must export his Router
- Your child server should not spawn his own server
- Add your child server to the masterConfig.json
[
{
"name": "Root Website",
"path": "./childServers/rootServer.js"
},
{
"subdomain": "www",
"redirect": "Root Website"
},
{
"name": "Api Server",
"subdomain": "api",
"path": "./childServers/apiServer.js"
},
{
"name": "Niklas Website",
"subdomain": "niklas",
"path": "./childServers/niklasServer.js"
},
{
"subdomain": "api.niklas",
"redirect": "Api Server"
}
]
The name is there to identify the server and used for redirects
The subdomain the server should get request from
The name of another server to redirect the request to (Destination server must come BEFORE redirect in config)
The path to your child-servers start file that exports the express Router