There is excellent documentation and screencasts (Sailscasts) on how to make either a JSON API or an HTML (EJS) templated app using Sails.js, but is there a way to create a JSON API and an HTML webapp simultaneously. In rails this is done using either respond_to do |format| block or (in a more scalable fashion) with namespaced, versioned api routes and controllers.
http://www.emilsoman.com/blog/2013/05/18/building-a-tested/
is there something similar in sails.js?