Closed ilearnio closed 6 years ago
I had to also fix detection of the environment in this.options.env
because Object.keys(root).length === 0
was not doing it properly when 2 or more instances of router are running. Since root._pathname
was specified when running first instance Object.keys(root).length
become 1 and for the next instance the expression started to return "client"
(when on the server side)
This is primarily for server side. When a new instance of router is created and
.start()
is fired thegrapnel-server
will now push the very firstserverMiddleware
into a newrouter.rootStack
property instead ofGrapnel.CallStack.global
which is shared between instances