externalizing clustering and server startup into npm modules