reapp / reapp-routes

Simple route DSL
MIT License
34 stars 13 forks source link

make reapp routes support subpath #12

Open 9nix00 opened 8 years ago

9nix00 commented 8 years ago

Dear all,

We are trying use reapp-routes in our web project.

the js file not start in '/' path. how to make it work?

we tried this:

module.exports = ({ routes, route }) =>
    routes(require,
        route('app', '/forecast/purchase/calculator', {dir: ''},
            route('kitchen', '/')
        )
    );

and this

module.exports = ({ routes, route }) =>
    routes(require,
        route('app', '/', {dir: ''},
            route('kitchen', '/forecast/purchase/calculator')
        )
    );

both of them not work.

Warning: No route matches path "/forecast/purchase/calculator/". Make sure you have <Route path="/forecast/purchase/calculator/"> somewhere in your routes