Scaffolding a Service
Last updated
Was this helpful?
Last updated
Was this helpful?
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. To learn more:
Run the scaffold service create command in the root of your app directory:
For example:
After running the command, the following files and folder will be created:
Run the scaffold service list
command to list all services. You should see your new service called "samplesapis" as well as others used by Scaffold:
(Optional) For custom container services, define them using the scaffold Docker Compose yaml file. See the following guide:
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 be route-able through the local container proxies.
Run this single command to add all services:
Then your /etc/hosts
should have the service hosts at the bottom.
Using the above example:
Now that your service is created, you can now run workflows!
Or to further customize a workflow, see: