philippkueng / node-neo4j

Neo4j REST API wrapper for Node.js
MIT License
211 stars 44 forks source link

Looking for AngularJS support #45

Closed dksfcb closed 10 years ago

dksfcb commented 10 years ago

Can you please add support in node-neo4j to be used in AngularJS or suggestion on how to use the existing package in AngularJS

Thanks in advance.

cjus commented 10 years ago

@dksfcb Neo4j supports REST endpoints. Have you considered using that with AngularJS $resource or $http? See: https://github.com/rorymadden/angular-neo4j

freeeve commented 10 years ago

Better to not connect to neo4j (or most any datastore) directly from the browser, IMO. There are only a few use cases where that would be ok from a security standpoint. But yeah, you could just talk to Neo4j's endpoints directly.

philippkueng commented 10 years ago

Hi @dksfcb,

This npm package is meant to be for the server side. There have been talks about adding support for JSONP (enabling a browser to fetch something on another domain) however because a database shouldn't be fully public on the internet I'd advise you not to let the browser talk directly to the database.

What however works if you use node-neo4j with a server side framework like express or hapi and expose certain resources via REST to your Angular application. Alternatively if you don't want to completely stub out a REST API you can also use the server as a cypher query proxy that way.

dksfcb commented 10 years ago

Thanks a lot for your comments and feedback/suggestions. Really appreciate it