A remote provider built for use with pogostick (although you could use a different rpc library).
Seperate network code from your service definition.
// For example a `math` servicemoduleexports = procnet;
// An example `rectangle` service.moduleexports = procnet;
Unit Test Services
One of the benefit of seperating your logic this way is the way it permits you to unit test your services, mocking dependencies.
// You can pick any promise library you want, just need to provide a factory function.var mock = procnet;var mocked =;mocked;