Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spoonx/trailpack-wetland
📦 Wetland ORM Trailpack https://wetland.spoonx.org
https://github.com/spoonx/trailpack-wetland
Last synced: about 1 month ago
JSON representation
📦 Wetland ORM Trailpack https://wetland.spoonx.org
- Host: GitHub
- URL: https://github.com/spoonx/trailpack-wetland
- Owner: SpoonX
- License: mit
- Created: 2017-03-13T09:20:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-14T15:21:45.000Z (over 7 years ago)
- Last Synced: 2024-11-13T07:08:21.735Z (about 1 month ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trailpack-wetland
Wetland ORM Trailpack https://wetland.spoonx.org
## Installation
1. `npm install --save trailpack-wetland`
2. Choose an adapter (list below) `npm i --save sqlite3`
3. `mkdir api/entity`
4. `echo "module.exports.wetland = {};" > config/wetland.js`
5. `echo "module.exports = require('./config/wetland').wetland;" > wetland.js`## Configuration
Out of the box, wetland works with sqlite3, so there's no need to configure anything.
An extensive list with config options and explanation can be found in [the wetland documentation](https://wetland.spoonx.org/configuration.html).### Example config
The simplest configuration _(which will be what's used 9/10 times)_ is as follows:**config/wetland.js**
```js
const path = require('path');module.exports.wetland = {
entityPath: path.resolve(process.cwd(), 'api', 'entity'),
stores : {
defaultStore: {
client : 'mysql',
connection: {
host : '127.0.0.1',
user : 'your_database_user',
password: 'your_database_password',
database: 'myapp_test'
}
}
}
};
```### Adapters
| Adapter | Command |
| ------------- | ------------- |
| mysql | `npm i mysql --save` |
| mysql2 | `npm i mysql2 --save` |
| pg | `npm i pg --save` |
| sqlite3 | `npm i sqlite3 --save` |
| mariasql | `npm i mariasql --save` |
| strong-oracle | `npm i strong-oracle --save` |
| oracle | `npm i oracle --save` |
| mssql | `npm i mssql --save` |