(Medium) - Evolvable APIs
View original- current
This article is too short to summarise.
This file contains hidden or 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); |