How to have multiple server (sapper) get, post, etc routes in a single file?
问题 I am using sapper server routing and this works with individual .js files that will handle a single get, post, etc using the filename as the route and export function post(req,res,next). I would like to use my own server routing like Express with multiple handlers in a single file like... app.post('/api/abc', req,res,next) app.post('/api/def', req,res,next) Is this possible in Sapper and if so can someone please give an example? 回答1: Add the handlers to your server.js: polka() // Or `express(