gkaimakas
gkaimakas

Reputation: 582

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?

Upvotes: 3

Views: 705

Answers (1)

John Munsch
John Munsch

Reputation: 19528

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.

Upvotes: 1

Related Questions