实时、分布式、嵌入式图形数据库引擎:GUN

g2md 9年前

GUN是一个实时的、分布式的、嵌入式图形数据库引擎。

Getting Started

For the browser, try out this tutorial. This README is for GUN servers.

If you do not have node or npm, read this first. Then in your terminal, run:

npm install gun

Now you can require it in the app you want to build.

var Gun = require('gun');

Once included, initialize a gun instance with a file path or your AWS S3 credentials.

var gun = Gun({      file: 'data.json',      s3: { // Optional!          key: '', // AWS Access Key          secret: '', // AWS Secret Token          bucket: '' // The bucket you want to save into      }  });

These are the default persistence layers, they are modular and can be replaced by others.

Using S3 is recommended for deployment, and using a file is recommended for local development.

Demos

The examples included in this repo are online here, you can run them locally by:

npm install gun cd node_modules/gun  node examples/http.js 8080

Then visit http://localhost:8080 in your browser. If that did not work it is probably because npm installed it to a global directory. To fix that trymkdir node_modulesin your desired directory and re-run the above commands. You also might have to addsudoin front of the commands.

项目主页:http://www.open-open.com/lib/view/home/1441164210518