Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect ECONNREFUSED 127.0.0.1:2424 #440

Open
Emeshka opened this issue Nov 15, 2020 · 0 comments
Open

connect ECONNREFUSED 127.0.0.1:2424 #440

Emeshka opened this issue Nov 15, 2020 · 0 comments

Comments

@Emeshka
Copy link

Emeshka commented Nov 15, 2020

I'm trying to connect to demodb at first time, using the example. I'm using Angular, so I installed @types/orientjs and orientjs (with no errors). Following is in the AppComponent.

private OrientDB = this._electronService.remote.require("orientjs");
private client = this.OrientDB.OrientDBClient;

ngOnInit() {
    this.client.connect({
        host: "localhost",
        port: 2424
    })
}

It fails with the message in the header.
I searched a bit and found this code. Tried it, the same error. Both console.logs output some objects, but at database.select call it fails:

this.server = this.OrientDB({
  host: 'localhost',
  port: 2424,
  username: 'admin',
  password: 'admin'
});
console.log(this.server);
this.database = this.server.use('demodb');
console.log(this.database);
this.database.select().from('OUser').all()
  .then(function(result) {
    console.log(result);
  });

I'm just learning client-server DBs, I have only an experience of embedded SQLite, so I can make stupid mistakes. Should I also install OrientDB from the official site to use this driver? Or do something besides the code above (this is the only code related to Orientjs in my project)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant