Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/themost-framework/pool
Most Web Framework data adapter for connection pooling
https://github.com/themost-framework/pool
Last synced: about 7 hours ago
JSON representation
Most Web Framework data adapter for connection pooling
- Host: GitHub
- URL: https://github.com/themost-framework/pool
- Owner: themost-framework
- License: bsd-3-clause
- Created: 2020-10-02T15:17:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T10:11:10.000Z (8 months ago)
- Last Synced: 2024-03-19T16:26:49.011Z (8 months ago)
- Language: JavaScript
- Size: 276 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# themost-pool
Most Web Framework data adapter for connection pooling## Install
npm install @themost/pool
## Usage
Register Generic Pool Adapter on app.json as follows:"adapterTypes": [
...
{ "name":"...", "invariantName": "...", "type":"..." },
{ "name":"Pool Data Adapter", "invariantName": "pool", "type":"@themost/pool" }
...
],
adapters: [
...
{ "name":"development", "invariantName":"...", "default":false,
"options": {
"server":"localhost",
"user":"user",
"password":"password",
"database":"test"
}
},
{ "name":"development_with_pool", "invariantName":"pool", "default":true,
"options": {
"adapter":"development"
}
}
...
]The generic pool adapter will try to instantiate the adapter defined in options.adapter property.
# Options
### adapter:
The name of the data adapter to be linked with this pool adapter.`@themost/pool` adapter uses [generic-pool](https://github.com/coopernurse/node-pool#documentation).
Read more about `generic-pool` [here](https://github.com/coopernurse/node-pool#documentation)Important Note: Upgrade from 2.2.x to 2.5.x
Replace `@themost/[email protected]` configuration:
{
"adapter": "development",
"size": 25,
"timeout": 30000,
"lifetime": 1200000
}with:
{
"adapter": "development",
"max": 25,
"acquireTimeoutMillis": 30000
}