不要怂,就是干,撸起袖子干!

Commit 4caa17c7 by Chris Jensen Committed by Sushant

docs(usage): postgres UNIX socket example (#9301)

1 parent e6de1711
Showing with 16 additions and 0 deletions
......@@ -54,6 +54,9 @@ const sequelize = new Sequelize('database', 'username', 'password', {
// custom host; default: localhost
host: 'my.server.tld',
// for postgres, you can also specify an absolute path to a directory
// containing a UNIX socket to connect over
// host: '/sockets/psql_sockets'.
 
// custom port; default: dialect default
port: 12345,
......@@ -202,6 +205,19 @@ const sequelize = new Sequelize('database', 'username', 'password', {
})
```
To connect over a unix domain socket, specify the path to the socket directory
in the `host` option.
The socket path must start with `/`.
```js
const sequelize = new Sequelize('database', 'username', 'password', {
// gimme postgres, please!
dialect: 'postgres',
host: '/path/to/socket_directory'
})
```
### MSSQL
The library for MSSQL is`tedious@^1.7.0` You'll just need to define the dialect:
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!