JonAbrams / synth

The first back-end framework specially designed for single-page web applications
http://www.synthjs.com
MIT License
969 stars 70 forks source link

about the routing path --> Filesytem #78

Closed Bromoxid closed 10 years ago

Bromoxid commented 10 years ago

Hi guys, can you tell me how I can use routes like : '/Main/sub' ? I can route to /Main with exports.getIndex() at Filesystem back/resources/Main/getMain.js , but whats with /sub? (he dosent find it at back/resources/Main/sub/getsub.js)

ideas?

Bromoxid commented 10 years ago

Ok I have found something at the synth-api handlersParser.js this sniped:

for (var i = 0; i < pathArr.length; i++) { path += pathArr[i]; if (i < pathArr.length - 1) { path += '/';//'/:' + pathArr[i] + 'Id/'; } }

JonAbrams commented 10 years ago

You can maybe try adding a exports.getSub = function () {} to back/resources/Main/getMain.js.

Bromoxid commented 10 years ago

Noo I had a bad typo -.- , the changes at handlersParser.js works fine ^^