Router Class
Description
This module is used to manage routes.
Constructor
Router
This module is used to manage routes.
Methods
set
(source, callback) chainableSets a router.
You can use either a function:
router.set('index.html', function(callback){ fs.readFile('index.txt', function(err, content){ if (err) return callback(err); callback(null, content); });});
or a string:
router.set('foo.html', 'foo');
Parameters
- source String
- callback Any