Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular.js web app through Sails.js server

I am developing a web application using Sailsjs for the backend and Angular.js for the front end. To scaffold the Angular app I have used yeoman with the angular generator and for the back end I used the default Sails app generator.

During development I run 2 servers, the 1st is the sails server to host the back end and the second a grunt server for the front end.

For now my configuration works fine but when in production I want to combine the two ends in one and have sails server serve the angular web app...

Can someone explain how to do this?

like image 324
gkaimakas Avatar asked Mar 25 '26 13:03

gkaimakas


1 Answers

I haven't used Sails before but it looks like it generates an assets directory. If you'll notice, Yeoman created an "app" directory into which it put the index.html, JavaScript, styles, etc. It appears you could transfer the contents of the Yeoman "app" directory to the Sail "assets" directory and it would be served up.

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

If no one with specific experience with Sails shows up, maybe that will help some.

like image 156
John Munsch Avatar answered Mar 27 '26 03:03

John Munsch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!