hoodiehq-archive / my-first-hoodie

⛔ deprecated
Other
157 stars 35 forks source link

Deploy hoodie backend only #68

Closed arnoutaertgeerts closed 9 years ago

arnoutaertgeerts commented 9 years ago

Would it be possible to solely deploy a hoodie backend and run the frontend somewhere else?

This would be an ideal solution for a mobile app. The hoodie backend will be deployed on a server (nodejitsu, heroku, ...) while the mobile app only uses the hoodie frontend:

hoodie = new Hoodie('http://remotehoodie/_api');

This way I can still use all my frontend boilerplate code and only need to change my backend references.

Is this possible by just deploying this app and removing the /www folder?

gr2m commented 9 years ago

yes, that's possible, Hoodie is CORS-enabled by default. You can simply do

hoodie = new Hoodie('http://remotehoodie'); // leave out the /_api

I think the /www folder might still be required (I think there is an issue for that), but you can simply ignore it.