Vijay Rajasekaran
Vijay Rajasekaran

Reputation: 613

How to use only the REST API of Sails.js as a backend for a Hybrid HTML5 App

I am developing a Group Chat App using Intel XDK (App Framework). I see lot of examples on creating a chat application on web, but never came across using Sails's REST API as backend only service which can be used within a HTML5 app.

If you have any insights about the same, please do advise me.

Upvotes: 3

Views: 3109

Answers (2)

Raj Adroit
Raj Adroit

Reputation: 3878

Sails also provides option to skip front end things by using the arguments --no-frontend

Example: sails new my-api --no-frontend

It will produce the following folder structure

enter image description here

Upvotes: 17

caseyWebb
caseyWebb

Reputation: 2086

If you simply delete Gruntfile.js and the views, tasks, and assets directories you will be left with a bare bones JSON api. You may choose to configure cors as well, which can be easily done using the documentation found in config/cors.js

Upvotes: 5

Related Questions