Scaffolding a Service
Background
An app will likely depend on one or more services. Scaffolding a service will by default create the following workflows - record, mock, and test. It additionally will enable creating custom workflows for individual services.
Steps to Scaffold a Service
Run the scaffold service create command in the root of your app directory:
For example:
After running the command, the following files will be created:
From the above, we can see that folders for mock, record, and test workflows are created by default.
Define the hostname
Next, an entry in /etc/hosts
should be added for each of your services that have a hostname. This will allow those defined services to be discoverable and requests to them will route-able through the local container proxies.
For local services, define them using Docker Compose
As a reminder, "local" services are ones you want to run. These are often services your team owns.
"External" services are ones you do not own such as ones owned by other teams or third-party APIs
Now that your service is created, you can now run workflows!
Last updated