Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke authored and 1st1 committed Aug 12, 2021
1 parent 5d99de8 commit 1cb75c3
Showing 1 changed file with 21 additions and 27 deletions.
48 changes: 21 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,44 @@ The library requires NodeJS 10 or later.

## Installation

```
npm install edgedb --save
```

or

```
yarn add edgedb --save
```bash
npm install edgedb
# or
yarn add edgedb
```

## Quick Start
## Quickstart

Follow the [EdgeDB tutorial](https://edgedb.com/docs/tutorial/index)
to get EdgeDB installed and minimally configured.
First, go through the [EdgeDB Quickstart](https://edgedb.com/docs/quickstart)
to install EdgeDB and set up your first EdgeDB project.

Next, create the `package.json` file:
Now in your project directory, install the "edgedb" library:

```
mkdir myproject
cd myproject
```bash
npm init
```

Next, install the "edgedb" library:

```
npm install edgedb --save
npm install edgedb
```

And here's a simple script to connect to an EdgeDB instance and
And here's a simple script to connect to your EdgeDB instance and
run a simple query:

```js
const edgedb = require("edgedb");

async function main() {
const conn = await edgedb.connect({
user: "edgedb",
host: "127.0.0.1",
});
const conn = await edgedb.connect();

try {

console.log(await conn.fetchOne("SELECT 1 + 1"));
console.log(
await conn.querySingle(`SELECT re_replace('World', 'EdgeDB',
'Hello World!')`)
);

await conn.close();
} finally {
await conn.close();
}
}

main();
Expand Down

0 comments on commit 1cb75c3

Please sign in to comment.