visionmedia / express-resource

Resourceful routing for Express
1.41k stars 140 forks source link

adding paths? #86

Closed angelochen960 closed 10 years ago

angelochen960 commented 10 years ago

Hi, following the sample: var forums = app.resource('forums', require('./routes/forums')); I can do: curl -i localhost:3000/forums how to put the forums behind a path, say:

curl -i localhost:3000/api/forums ? possible?

angelo

angelochen960 commented 10 years ago

oh, found it, it should have been: var forums = app.resource('api/forums', require('./routes/forums')); why following does not work: var forums = app.resource('/api/forums', require('./routes/forums'));