Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Cleanup: Use LiveActor to cleanup Pacto Server code #143

Open
maxlinc opened this issue Jul 29, 2014 · 0 comments
Open

Cleanup: Use LiveActor to cleanup Pacto Server code #143

maxlinc opened this issue Jul 29, 2014 · 0 comments

Comments

@maxlinc
Copy link
Collaborator

maxlinc commented Jul 29, 2014

Originally proposed in #115 and #114.

LiveProviderActor - Proxies the request to a real service endpoint, either the actual provider or an out of process stub server like Mountebank or Mimic.

This could help clean up the Pacto Server code, especially, but could also be useful for normal Pacto.

Something like this might be especially useful:

Pacto::Generator 'Cloud Servers' do
  actor LiveActor, backend: 'http://localhost:3000'
  load_contracts 'contracts/cloud_servers'
end

Pacto::Generator 'Cloud Files' do
  actor LiveActor, backend: 'http://localhost:4000'
  load_contracts 'contracts/cloud_files'
end

Note that this allows Pacto to proxy different services to different endpoints (port 3000 vs 4000 above). This would it easier to use Mimic or Mountebank, which both open differnet ports.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant