Last active
February 5, 2019 10:34
-
-
Save FagnerMartinsBrack/0fef5db5d87cd875fabd7d41143ad6fb to your computer and use it in GitHub Desktop.
(Medium) - Evolvable APIs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The brains to fill the fields. This uses the human brain of the user. | |
const usingCLI = (fields) => { | |
const fieldsWithValuesFromUser = await presentFieldNamesToUser(Object.keys(fields)); | |
return fieldsWithValuesFromUser; | |
}; | |
// The client uses the CLI to get the field values when the server asks for it | |
const runWithFieldsFromCLI = run(usingCLI); | |
// Initial trigger of the booking process | |
const result = await runWithFieldsFromCLI(); | |
console.log('exit point', result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment