Skip to content

Commit b393f76

Browse files
committed
Update README and bump to v0.1.3
1 parent 14a805e commit b393f76

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node_modules
22
build/*
33
!build/Release/nodemgclient.node
4-
!build/Debug/nodemgclient.node
54
.cache
65
.github

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cmake_minimum_required(VERSION 3.10)
1212
# The following does not work because CMake changes the string to be Windows path.
1313
# set(CMAKE_SHARED_LINKER_FLAGS "/DELAYLOAD:/c/Program\\ Files/nodejs/node.exe")
1414

15-
project(nodemgclient VERSION 0.1.2)
15+
project(nodemgclient VERSION 0.1.3)
1616

1717
if (WIN32 AND MINGW)
1818
message(FATAL_ERROR "ON WINDOWS BUILD UNDER MINGW NOT YET POSSIBLE")

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,44 @@
99

1010
## Installation
1111

12+
As usual the package could be downloaded from npm by executing:
13+
```
14+
npm install @memgraph/client
15+
```
16+
At the moment only Linux shared library is shipped inside the package. For any
17+
other operating system or incompatible library version, please proceed with
18+
building from source as explained below.
19+
20+
Once the package is properly installed, you can run a simple example:
21+
```
22+
const memgraph = require('@memgraph/client');
23+
24+
(async () => {
25+
try {
26+
const connection = await memgraph.Connect({
27+
host: 'localhost',
28+
port: 7687,
29+
});
30+
await connection.ExecuteAndFetchAll("CREATE (:Graphs)-[:ARE]->(:Powerful);");
31+
console.log(await connection.ExecuteAndFetchAll(
32+
"MATCH (n)-[r]->(m) RETURN n, r, m;"));
33+
} catch (e) {
34+
console.log(e);
35+
}
36+
})();
37+
```
38+
39+
## Build from Source
40+
41+
Below you can find instruction for Linux, MacOS and Windows. You'll know if the
42+
package was successfully build when there will be a file called
43+
`nodemgclient/Release/nodemgclient.node`, that's a shared library required to
44+
use the client.
45+
Once the library is in place you can pull it in your project just by running:
46+
```
47+
npm install <path-to-the-repo>
48+
```
49+
1250
### Build from Source on Linux
1351

1452
To install `nodemgclient` from source you will need:
@@ -62,7 +100,7 @@ because of the header files.
62100

63101
NOTE: Compilation does NOT work yet under MinGW.
64102

65-
## Build from Source on MacOS
103+
### Build from Source on MacOS
66104

67105
To build on MacOS it's required to install the `openssl` package, e.g.:
68106
```

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@memgraph/client",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"engines": {
55
"node": ">=12.0.0"
66
},

0 commit comments

Comments
 (0)