First you need to import Orijs into your express application for which you can make
npm install orientjs
After that, you will need landmarks and create a connection with orientDb.
var orientJs = require('orientjs'); var orientDb = OrientJs({ host: "yourhostName", port: "orientdb Port ", username: "OrientDB user Name", password: "password" });
Now specify the database you want to connect to
var db = orientDb.use({ name: 'database name', username: 'database user', password: 'password' });
Once this is done, you can use "db" to run your request. Now you can use the raw query or Orijs query designer to write your request.
This can be done, for example,
db.select().from(className).all().then(funtion(res){ console.log(res); },function(err){ console.log(err); });
source share