deesse 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-type-check.log +1 -1
- package/README.md +48 -0
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Deesse
|
|
2
|
+
|
|
3
|
+
Type-safe configuration for DeesseJS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install deesse
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { defineConfig } from 'deesse';
|
|
15
|
+
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
16
|
+
import { Pool } from 'pg';
|
|
17
|
+
|
|
18
|
+
export const config = defineConfig({
|
|
19
|
+
database: drizzle({
|
|
20
|
+
client: new Pool({ connectionString: process.env.DATABASE_URL }),
|
|
21
|
+
schema,
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Config
|
|
27
|
+
|
|
28
|
+
### `database`
|
|
29
|
+
|
|
30
|
+
A Drizzle ORM database instance. Supports PostgreSQL, MySQL, and SQLite.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
34
|
+
import { Pool } from 'pg';
|
|
35
|
+
|
|
36
|
+
const db = drizzle({
|
|
37
|
+
client: new Pool({ connectionString: process.env.DATABASE_URL }),
|
|
38
|
+
schema,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export const config = defineConfig({
|
|
42
|
+
database: db,
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT
|