Asynchronous task runner for Node.js
Asynchronous task runner for Node.js Beta version - use at own risk.
Basic usage example.
auto// Get data, simulation as asynchornous operationget_data:next nullname: 'Eric Flatley'username: 'Arnoldo_Lubowitz'email: 'Tyshawn@emie.biz'phone: '917.531.3079 x06115'website: 'donald.io';// Create folder, which is an asynchronous operationmake_folder: 'get_data'setTimeout next null 'folder created' ; 100// Write file once we have the data and folder is createdwrite_file: 'get_data' 'make_folder'setTimeout next null 'folder created' ; 200// Email Link once file is writtenemail_link: 'write_file'next null 'email sent' ;once 'complete' console.log
The auto task runner may be used as a middleware method.
appget '/test/:id' automiddleware tasks ;
See the "express" example in the examples directory.
Advanced usage example.
Each instance has the following properties.
Each step is executed within a context with the following properties:
(The MIT License)
Copyright (c) 2013 Usability Dynamics, Inc. <email@example.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.