Created
August 19, 2016 04:55
-
-
Save dimitrovs/67ac2fb74e20583f125440065924a77c to your computer and use it in GitHub Desktop.
Sails.js SPA routes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix: '/api', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
index: function(req, res) { | |
res.sendfile(__dirname, 'index.html'); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'get /': { | |
controller: 'index', | |
action: 'index' | |
}, | |
'*': { | |
target: '/', | |
skipAssets: true, | |
skipRegex: /^\/api\/.*$/ | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment