@dbos-inc/create 2.6.17-preview → 2.7.8-preview
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/package.json +1 -1
- package/templates/dbos-drizzle/dbos-config.yaml +1 -0
- package/templates/dbos-knex/dbos-config.yaml +2 -0
- package/templates/dbos-knex/src/main.ts +4 -0
- package/templates/dbos-prisma/dbos-config.yaml +1 -0
- package/templates/dbos-typeorm/datasource.ts +6 -6
- package/templates/dbos-typeorm/dbos-config.yaml +1 -0
package/package.json
CHANGED
|
@@ -82,6 +82,10 @@ app.get('/greeting/:name', (req: Request, res: Response) => {
|
|
|
82
82
|
|
|
83
83
|
// Finally, launch DBOS and start the server
|
|
84
84
|
async function main() {
|
|
85
|
+
DBOS.setConfig({
|
|
86
|
+
name: 'dbos-knex',
|
|
87
|
+
databaseUrl: process.env.DBOS_DATABASE_URL,
|
|
88
|
+
});
|
|
85
89
|
await DBOS.launch({ expressApp: app });
|
|
86
90
|
const PORT = 3000;
|
|
87
91
|
const ENV = process.env.NODE_ENV || 'development';
|
|
@@ -6,12 +6,12 @@ const [dbosConfig] = parseConfigFile();
|
|
|
6
6
|
|
|
7
7
|
const AppDataSource = new DataSource({
|
|
8
8
|
type: 'postgres',
|
|
9
|
-
host: dbosConfig.poolConfig
|
|
10
|
-
port: dbosConfig.poolConfig
|
|
11
|
-
username: dbosConfig.poolConfig
|
|
12
|
-
password: dbosConfig.poolConfig
|
|
13
|
-
database: dbosConfig.poolConfig
|
|
14
|
-
ssl: dbosConfig.poolConfig
|
|
9
|
+
host: dbosConfig.poolConfig!.host,
|
|
10
|
+
port: dbosConfig.poolConfig!.port,
|
|
11
|
+
username: dbosConfig.poolConfig!.user,
|
|
12
|
+
password: dbosConfig.poolConfig!.password as string,
|
|
13
|
+
database: dbosConfig.poolConfig!.database,
|
|
14
|
+
ssl: dbosConfig.poolConfig!.ssl as TlsOptions,
|
|
15
15
|
entities: ['dist/entities/*.js'],
|
|
16
16
|
migrations: ['dist/migrations/*.js'],
|
|
17
17
|
});
|