if (!app.router.dispatch(req, res, app.http.onError || union.errorHand
^
TypeError: Object #<Object> has no method 'dispatch'
at Array.exports.attach.app.createServer.app.server.union.createServer.before [as 1]
Marak Squires
unread,
Sep 8, 2012, 9:35:44 PM9/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to flati...@googlegroups.com
app.router is a Director.router instance. You can't override it like that. Maybe you can try setting app.router.routes, but I don't think that would work either.
There should be an API method for adding routes as JSON. Should be in the README as "mount"
mount(routes, path)
routes {object}: Partial routing table to insert into this instance.
path {string|Regexp}: Path within the Routing Table to insert the routes into.
Inserts the partial Routing Table, routes, into the Routing Table for this Router instance at the specified path.
Marak Squires
unread,
Sep 8, 2012, 9:41:58 PM9/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to flati...@googlegroups.com
You can also follow the example you posted which uses the following syntax:
var router = new director.http.Router(routes);
On Sat, Sep 8, 2012 at 6:29 PM, shawn wilson <ag4v...@gmail.com> wrote:
shawn wilson
unread,
Sep 8, 2012, 9:44:04 PM9/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message