如何将orientdb与nativescript连接
我正在使用nativescript,但无法连接数据库是orientdb。我尝试了npm安装orientjs,但没有成功。运行命令npm install orientjs后,请帮助我 将此代码保存在file.js中:如何将orientdb与nativescript连接,nativescript,Nativescript,我正在使用nativescript,但无法连接数据库是orientdb。我尝试了npm安装orientjs,但没有成功。运行命令npm install orientjs后,请帮助我 将此代码保存在file.js中: var OrientDB = require('orientjs'); var server = OrientDB({ host: 'localhost', port: 2424, username: 'root', password: '
var OrientDB = require('orientjs');
var server = OrientDB({
host: 'localhost',
port: 2424,
username: 'root',
password: 'root'
});
var db = server.use({
name: 'GratefulDeadConcerts',
username: 'root',
password: 'root'
});
server.close();
更新
var OrientDB = require('orientjs');
var server = OrientDB({
host: 'localhost',
port: 2424,
username: 'root',
password: 'root'
}).use({
name: 'GratefulDeadConcerts',
username: 'root',
password: 'root'
});
server.close();
希望能有所帮助我已经试过了,但没有成功。我已经更新了我的答案,你能试试吗?让我知道你是如何安装orientjs的?npm i orientjs--save尝试运行以下命令安装orientjs:npm install orientjs in Node.js命令提示符,让我知道