Git Product home page Git Product logo

node-neo4j-template's Introduction

Build Status

Node-Neo4j Template

This is a template Node.js + Neo4j app, using the node-neo4j library (available on npm as neo4j).

A demo is running on Heroku at https://node-neo4j-template.herokuapp.com/.

The app is a simple social network manager: it lets you add, remove, follow, and unfollow users. It's basic, and the UI is crappy, but hey, it's a template app. =)

So try it out, browse the code, and fork this project to get a head start on coding your own app. Enjoy!

Installation

git clone [email protected]:aseemk/node-neo4j-template.git
cd node-neo4j-template
npm install

You'll also need a local Neo4j 2.x instance. Install it via neo4j.org/download, or if you're on a Mac, brew install neo4j.

Usage

Start your local Neo4j instance (e.g. neo4j start), then:

npm start

The app will now be accessible at http://localhost:3000/.

To run the tests:

npm test

Deploying

This app is running on Heroku, using the free version of the GrapheneDB add-on:

https://node-neo4j-template.herokuapp.com/

You can run your own instance similarly for free:

Deploy

If you prefer to deploy this sample app manually, these are the steps:

heroku create [your-app-name]
heroku addons:add graphenedb
git push heroku master

There's already a Procfile here, and the code already checks for the necessary PORT and GRAPHENEDB_URL environment variables, so your deploy should go off without a hitch!

If you're deploying in another way, the code also checks for a NEO4J_URL environment variable to support pointing to any other Neo4j database. The value of this variable should be set to the database root URL, and it can contain HTTP Basic Auth info. E.g. https://user:[email protected]:5678. You can alternately pass the auth portion (user:pass) as NEO4J_AUTH.

One thing to note is that npm start is currently geared towards development: it runs node-dev instead of node. Edit scripts.start in package.json if you need to change that.

Miscellany

  • MIT license.
  • Questions/comments/etc. are welcome.
  • As an exercise, I built this without using CoffeeScript or Streamline. What a gigantic pain! Never again. =P

node-neo4j-template's People

Contributors

aseemk avatar

Watchers

James Cloos avatar Justin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.