Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 4caa17c7
authored
Apr 20, 2018
by
Chris Jensen
Committed by
Sushant
Apr 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(usage): postgres UNIX socket example (#9301)
1 parent
e6de1711
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
docs/usage.md
docs/usage.md
View file @
4caa17c
...
@@ -54,6 +54,9 @@ const sequelize = new Sequelize('database', 'username', 'password', {
...
@@ -54,6 +54,9 @@ const sequelize = new Sequelize('database', 'username', 'password', {
// custom host; default: localhost
// custom host; default: localhost
host
:
'my.server.tld'
,
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
// custom port; default: dialect default
port
:
12345
,
port
:
12345
,
...
@@ -202,6 +205,19 @@ const sequelize = new Sequelize('database', 'username', 'password', {
...
@@ -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
### MSSQL
The library for MSSQL is
`tedious@^1.7.0`
You'll just need to define the dialect:
The library for MSSQL is
`tedious@^1.7.0`
You'll just need to define the dialect:
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment