Express.js and Neo4j - node.js

I have seen alot of examples of how to integrate express.js and mongodb. Does anyone know a good way to integrate neo4j and express.js?
I have been playing around with node-neo4j and I am able to return cypher queries to the terminal. However, I am confused as to how to post the cypher query, in json format, to the local host.
Thanks for your help.

In order to reply simply to your question, there is an express module for Neo4j, here :
http://expressjs.com/guide/database-integration.html#neo4j
It will remove you the burden to format the json correctly for preparing the statements.
Repository is here if you want to see how it is used inside :
https://github.com/hacksparrow/apoc
Maybe you can contribute to it, for the quick look I did, I see that there is no support for 2.2 auth extension, so you may want to make a PullRequest in order to improve the library.

Related

How do I use Node.js to read server file within a Django application?

I have a django application that I use to visualize data. The data itself is in an Amazon S3 bucket, and the plotting of the data is done using bokeh. One of the applications however, uses d3 instead. And while I managed to configure the bokeh apps to work properly, I don't know how to do that with the d3 app. It has to read data either directly from S3 or locally (If I download it within django views before rendering the web page) and plot it. But whatever I try I get a 404 Not Found error.
I'm learning as I go, so I don't know what I'm doing wrong. Going through SO, I found this question which gives an example of downloading a file from S3 using Node.js, but I am already running a django server so I don't know if that works. I should also mention that the files to be read are quite large (several megabytes). So, to summarize, my question is:
Is using Node.js my only solution here and can it be done without having both Nodejs and django running at the same time? I'm worried that this might be too complex for me to set up. Or better yet, what would be a recommended solution in my case? I am almost done with the whole project but, unfortunately, I've gotten stuck pretty bad here.
Thank you to anyone willing to help or offer advice.

PostgreSQL + Node Integration

Need some advice regarding the following situation:
There is an existing PostgreSQL database that I would like to draw information from (with full authorization of course). How can I query the entries in that database using NodeJS? I know sequelize can offer what I'm looking for, but I'm a bit confused as to how to approach this. I've heard that I would have to migrate the data first in order to then query it. What's the best way to go about doing this? Thanks.
For reference, I've taken a look at this link (https://github.com/sequelize/sequelize/issues/3791) but haven't gotten what I'd hoped out of it.
You can query without migration for existing database, this package should help https://www.npmjs.com/package/pg

Using dc.js with node.js

Is it possible to use dc.js with node.js, and if so how? I would like to provide an example, but it's hard to see how to start on this, and no working examples seem to be available online.
In short, yes.
I have implemented a full fledged app using nodejs and dc while the document store was mongo. The nodejs server is used for fetching the data from mongo db and serving it as api. Dc.js then uses this data for rendering charts.
I will write a blog post about it and post it in a couple of days. In the meantime do let me know if you have any more queries.
Updated:
Here is the link to the blog post.Do share if you find it useful.
https://anmolkoul.wordpress.com/2015/06/05/interactive-data-visualization-using-d3-js-dc-js-nodejs-and-mongodb/

Best way to set an API server using Node.js and Postgres?

I'm new in Node.js. I'm trying to find out and learn which is the best way to set an Api Server, just for CRUD (Create, Read, Update and Delete) requests.
I've being looking around the different server frameworks that are normally used with Node.js:
Express
Restify
Hapi
I'm also using the node-postgres library already connecting to the database and making queries, but I haven't found a good guide or example using either of the previous frameworks to set an Api Server with PostgreSQL.
I'd be very thankful is someone could point me to the right direction or show me a basic example.
Thank you
Hapi has the best performance. Otherwise I hope this can help you:
http://blog.newrelic.com/2014/08/15/node-js-frameworks-hapi-js-restify-geddy
http://blog.nodeknockout.com/post/34571027029/making-an-api-happy-with-hapi
http://blog.modulus.io/nodejs-and-hapi-create-rest-api

nodejs with solandra connection

How to connect nodejs with solandra?
If it's possible provide some example code
I want to learn nodejs with solandra.
provide some sample code or some urls
Since the Casandra side of Solandra is really just a rework for indexing purposes I'd expect that the Solr interface should still be in tact.
Therefore, you probably want to take a look at https://github.com/gsf/node-solr.

Resources