How do I route all requests to index.html except some api calls and maybe some pages. since kraken way of routing is based on controller's directory, so if i do
// /controller/index.js
app.get('*', function(){
res.sendFile(__dirname + '/public/index.html');
});
kraken would route all my requests to index.html including the api calls in /controller/api directory. so how can i make kraken to route some requests like /api to the /controller/api/index.js and the rest to /public/templates/index.html?
Aucun commentaire:
Enregistrer un commentaire