sutandojs / sutando

Sutando is a modern Node.js ORM, like Laravel Eloquent.
https://sutando.org
MIT License
185 stars 15 forks source link

Typescript example with postgresql. #47

Open francelwebdev opened 4 months ago

francelwebdev commented 4 months ago

Typescript example with postgresql.

kiddyuchina commented 4 months ago

You can refer to https://github.com/sutandojs/sutando-examples/tree/main/typescript/rest-hono

Some changes need to be made:

  1. Install the pg
  2. Modify the connection information in the seed.ts/migrate.ts/index.ts file, such as:
    sutando.addConnection({
    client: 'pg',
    connection: {
    host: 'host',
    user: 'user',
    database: 'dashbase',
    password: 'password',
    ssl: { rejectUnauthorized: false },
    },
    });