Skip to content

Commit 712088c

Browse files
committed
Improve readme
1 parent 94e706b commit 712088c

File tree

3 files changed

+67
-12
lines changed

3 files changed

+67
-12
lines changed

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Postgres.js
1+
2+
3+
<img align="left" width="460" height="124" alt="Fastest full PostgreSQL nodejs client" src="postgresjs.svg" />
4+
25

36
- 🚀 Fastest full featured PostgreSQL client for Node.js
47
- 🚯 1300 LOC - 0 dependencies
@@ -7,6 +10,10 @@
710

811
## Getting started
912

13+
<br>
14+
<img height="220" alt="Good UX with Postgres.js" src="demo.gif" />
15+
<br>
16+
1017
**Install**
1118
```bash
1219
$ npm install postgres
@@ -15,7 +22,7 @@ $ npm install postgres
1522
**Use**
1623
```js
1724

18-
import postgres from 'postgres'
25+
const postgres = require('postgres')
1926

2027
const sql = postgres({ ...options }) // will default to the same as psql
2128

@@ -27,13 +34,6 @@ const something = await sql`
2734

2835
```
2936

30-
**Node pre 13.1.0**
31-
```js
32-
33-
const postgres = require('postgres/cjs')
34-
35-
```
36-
3737
## Connection options
3838

3939
You can use either a postgres:// url connection string or the options to define your database connection properties.
@@ -44,9 +44,9 @@ const sql = postgres('postgres://user:pass@host:port/database', {
4444
host : '', // or hostname
4545
port : 5432, // Postgres server port
4646
path : '', // unix socket path (usually '/tmp')
47-
database : '', // Database to connect to
48-
username : '', // or username
49-
password : '', // or password
47+
database : '', // or db
48+
username : '', // or user
49+
password : '', // or pass
5050
ssl : false, // True, or options for tls.connect
5151
max : 10, // Max number of connections
5252
timeout : 0, // Idle connection timeout in seconds

demo.gif

344 KB
Loading

postgresjs.svg

+55
Loading

0 commit comments

Comments
 (0)