Skip to content

Instantly share code, notes, and snippets.

@smyth64
Created November 18, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smyth64/15ba4018b583e8d42e90 to your computer and use it in GitHub Desktop.
Save smyth64/15ba4018b583e8d42e90 to your computer and use it in GitHub Desktop.
var log = new (require('captains-log'))();
var Stardog = require('stardog');
// Stardog is our database.
// To test this case you need a Stardog Server running.
var conn = new Stardog.Connection();
conn.setEndpoint("localhost:5820");
conn.setCredentials("admin", "admin");
var options = {
"database" : "test",
"options" : { "index.type": "disk" },
"files": []
};
// This command uses the restler module to make a POST query
conn.createDB(options, function (data, response) {
console.log(response.statusCode)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment