Edit Page

sails.config.routes

Configuration for custom (aka "explicit") routes. sails.config.routes is a dictionary whose keys are URL paths (the "route address") and whose values are one of several types of route handler configurations (called the "route target").

For example:

module.exports.routes = {

    'GET /': { view: 'pages/homepage' },
    'POST /foo/bar': { action: 'foo/bar' }
}

Please see the routes concept overview for a full discussion of Sails routes, and the custom routes documentation for a detailed description of the available configurations for both the route address and route target.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference