river-of-ebooks/config/routes.js

67 lines
2.7 KiB
JavaScript
Raw Normal View History

2018-10-16 01:45:37 +00:00
/**
* Route Mappings
* (sails.config.routes)
*
* Your routes tell Sails what to do each time it receives a request.
*
* For more information on configuring custom routes, check out:
* https://sailsjs.com/anatomy/config/routes-js
*/
module.exports.routes = {
// ╦ ╦╔═╗╔╗ ╔═╗╔═╗╔═╗╔═╗╔═╗
// ║║║║╣ ╠╩╗╠═╝╠═╣║ ╦║╣ ╚═╗
// ╚╩╝╚═╝╚═╝╩ ╩ ╩╚═╝╚═╝╚═╝
/***************************************************************************
* *
* Make the view located at `views/homepage.ejs` your home page. *
* *
* (Alternatively, remove this and add an `index.html` file in your *
* `assets` directory) *
* *
***************************************************************************/
'/': {
view: 'pages/homepage'
},
/***************************************************************************
* *
* More custom routes here... *
* (See https://sailsjs.com/config/routes for examples.) *
* *
* If a request to a URL doesn't match any of the routes in this file, it *
* is matched against "shadow routes" (e.g. blueprint routes). If it does *
* not match any of those, it is matched against static assets. *
* *
***************************************************************************/
// ╔═╗╔═╗╦ ╔═╗╔╗╔╔╦╗╔═╗╔═╗╦╔╗╔╔╦╗╔═╗
// ╠═╣╠═╝║ ║╣ ║║║ ║║╠═╝║ ║║║║║ ║ ╚═╗
// ╩ ╩╩ ╩ ╚═╝╝╚╝═╩╝╩ ╚═╝╩╝╚╝ ╩ ╚═╝
2018-10-24 03:13:56 +00:00
'POST /api/publish': {
controller: 'books',
action: 'publish'
},
2018-10-16 01:45:37 +00:00
2018-10-24 03:42:46 +00:00
'GET /api/books': {
controller: 'books',
action: 'list'
},
2018-10-16 01:45:37 +00:00
// ╦ ╦╔═╗╔╗ ╦ ╦╔═╗╔═╗╦╔═╔═╗
// ║║║║╣ ╠╩╗╠═╣║ ║║ ║╠╩╗╚═╗
// ╚╩╝╚═╝╚═╝╩ ╩╚═╝╚═╝╩ ╩╚═╝
// ╔╦╗╦╔═╗╔═╗
// ║║║║╚═╗║
// ╩ ╩╩╚═╝╚═╝
2018-10-24 03:13:56 +00:00
}