Giter Site home page Giter Site logo

veliovgroup / neo4j-demo Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 55 KB

Demo application for Neo4j-fiber package

Home Page: http://neo4j-graph.herokuapp.com

License: BSD 3-Clause "New" or "Revised" License

CSS 45.28% HTML 2.92% JavaScript 51.79%
neo4j graphenedb heroku demo meteor neo4j-database

neo4j-demo's Introduction

Demo app

Functionality:

  • Create / Change / Remove Cities (nodes)
  • Create / Change / Remove Routes (relationships)
  • Calculate shortest path (dijkstra, cheapest distance)
  • Graph visualization (by visjs)
  • Latency compensation (on visjs level, but we wait for server response)
  • Client synchronization with minimal delay
  • Exception-less conflicts UX-workflow
  • Example powered by GrapheneDB
  • No dependency from MongoDB

Set up Neo4j

Locally:

  • Download Neo4j
  • In Terminal go to downloads folder and type tar -xf <downloaded filename> -C ~/neo4j/
  • Start Neo4j: ~/neo4j/bin/neo4j start
  • Go to localhost:7474 and set up new credentials
  • Set NEO4J_URL environment variable to connection URL for Neo4j (NEO4J_URL="http://neo4j:1234@localhost:7474" node main.js)
  • Further reading

GrapheneDB:

  • Go to GrapheneDB, create an account and free (or paid) plan DB
  • Get DB's credentials from "DATABASES" > "Connection" tab
  • Go to server/main.coffee, change credentials to your instance of Neo4j

Heroku GrapheneDB Add-on:

  • From dashboard go to your app
  • On "Resouces" tab type in "Add-ons" section: graphenedb
  • Select plan and proceed through further steps
  • Get DB's credentials
  • Go to server/main.coffee, change credentials to your instance of Neo4j

Deploy to Heroku

  • Go to Heroku create and confirm your new account
  • Go though Node.js Tutorial
  • Install Heroku Toolbet
  • Set up Neo4j - see sections above
  • Then go to Terminal into Meteor's project directory and run:
meteor build ../build-<your-app-name>
cd ../build-<your-app-name>
tar xvzf <name-of-archive> -C ./
cd bundle/
cp -Rf * ../
cd ../
rm -Rf bundle/
rm -Rf <name-of-archive>
git init 
git add .
nano Procfile
web: node main.js
# press ctrl + o
# press Enter (return)
# press ctrl + x
npm init
# Ignore all warnings (but not errors)
heroku create <your-app-name> --buildpack https://github.com/heroku/heroku-buildpack-nodejs
# This command will output something like: https://<your-app-name>.herokuapp.com/ | https://git.heroku.com/<your-app-name>.git
# Copy this: `http://<your-app-name>.herokuapp.com`, note use only `http://` protocol!
heroku config:set ROOT_URL=http://<your-app-name>.herokuapp.com
heroku config:set NEO4J_URL=http://<url-to-neo4j>
git commit -m "initial"
git push heroku master
  • Go to http://<your-app-name>.herokuapp.com
  • If you app has errors:
    • Check logs: heroku logs --tail
    • Try to run locally and debug: heroku run node

neo4j-demo's People

Contributors

dr-dimitru avatar indirpendent avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.