Node.js Provider Rest API and angular.js WEB APP -
Node.js Provider Rest API and angular.js WEB APP -
i'm developing rest api in node.js / express expose resources (to backend). , web application manages sessions , interacts rest api (to frontend). api , web_app, in same domain, subdomain in both:
backend: api.example.com 2 frontend: www.example.comthe web application accessed client angular.js. architecture 2 situations:
main_rest_api <-> web_app <-> browser_user main_rest_api <-> rest_sdk <-> client
my question is: architecture consistent? best way implement scheme?
update:
i have implement architecture provide restfull via oauth2 third-party clients also
i don't understand question,
are sure need separate servers serving web app , api? you'll need handle cross domain requests way.
if don't need 2 servers, it'll simpler have 1 app, /api/ routes (for example) rest api. angularjs app can create ajax requests /api/ , / serve javascript web app.
again, don't understand question case need 2 separate servers.
api node.js rest angularjs
Comments
Post a Comment