diff options
| author | Peerawas Archavanuntakun <[email protected]> | 2022-01-06 03:30:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-05 14:30:32 -0600 |
| commit | 51d378e4cb4584196b14132b4d330b8d370f8fb3 (patch) | |
| tree | 176959c304bcb28ef33df0a3546bb4b88d691b09 /src/scripts/run-with-database-url.ts | |
| parent | 129d121364c7e976c7bf5e2da3976da230058d77 (diff) | |
| download | muse-51d378e4cb4584196b14132b4d330b8d370f8fb3.tar.xz muse-51d378e4cb4584196b14132b4d330b8d370f8fb3.zip | |
Setup and migrate to Prisma (#456)
Diffstat (limited to 'src/scripts/run-with-database-url.ts')
| -rw-r--r-- | src/scripts/run-with-database-url.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scripts/run-with-database-url.ts b/src/scripts/run-with-database-url.ts new file mode 100644 index 0000000..b7ae3a7 --- /dev/null +++ b/src/scripts/run-with-database-url.ts @@ -0,0 +1,13 @@ +import {DATA_DIR} from '../services/config.js'; +import createDatabaseUrl from '../utils/create-database-url.js'; +import {execa} from 'execa'; + +process.env.DATABASE_URL = createDatabaseUrl(DATA_DIR); + +(async () => { + await execa(process.argv[2], process.argv.slice(3), { + preferLocal: true, + stderr: process.stderr, + stdout: process.stdout, + }); +})(); |
