Angular.js web application via Sails.js server

I am developing a web application using Sailsjs for the backend and Angular.js for the frontend. To color the Angular app I used yoman with the Angular generator, and for the back end I used the default Sails app generator.

During development I run 2 servers, 1 is a sail server to host the rear and the second is a nag server.

At the moment my config is working fine, but in production I want to combine the two ends in one and the sails server serve the Angular web app ...

Can someone explain how to do this?

+3


source to share


1 answer


I haven't used Sails before, but it looks like it creates a resource directory. If you notice, Yeoman has created an "app" directory where it puts the index.html, JavaScript, and more styles. It looks like you can move the contents of the Yeoman "application" directory to the "assets" directory of Sail and it will be served.

http://sailsjs.org/#/documentation/concepts/Assets



If no one who doesn't have some experience with Sails might show up, it might help.

+1


source







All Articles