@sudoo/quest for Path Choosing
View document of
@sudoo/quest at https://quest.sudo.dog
The Old Way
In web back-end applications, there are many behaviors that change according to the permissions and requests passed in by users.
For example, in NodeJS, we can use the following code to do that.
This way is very effective until the request becomes complicated, and more importantly, these conditions cannot be reused gracefully in different APIs.
@sudoo/quest is easy, simply run the following command in your project folder.
Implementing same feature, we use more code, but in fact, in different APIs, we can use quest distributer to extract the reused part.