I want to connect to the tarantool cotainer using this code:
import TarantoolConnection from 'tarantool-driver'
let connection = new TarantoolConnection('192.168.99.100:3301');
connection.ping().then((res) => {
console.log(res);
});
Before that i started container:
docker run -p 3301:3301 -d tarantool/tarantool:1.6
But in result i get nothing.
If i try to create space or\and index for this space:
connection.eval("box.schema.space.create('myspace', {if_not_exists=true, temporary=true})").then((res) => {
console.log(res);
});
I get this error:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: This socket is closed
or:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: connection will be destroyed or already destroyed, create another one
As i see from the error, the needed socket is already closed, but i don't understand why.
Version of tarantool driver:
"tarantool-driver": "2.0.5",
How can i fix it?