-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jamesb
committed
Feb 24, 2024
1 parent
20dc51d
commit a96d5de
Showing
5 changed files
with
212 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import AWS from "aws-sdk"; | ||
import dotenv from "dotenv"; | ||
import fs from "fs"; | ||
|
||
dotenv.config(); | ||
|
||
AWS.config.update({ | ||
accessKeyId: process.env.AWS_ACCESS_KEY, | ||
secretAccessKey: process.env.AWS_SECRET, | ||
}); | ||
|
||
const localFilePath = "../../accounts.db"; | ||
|
||
var s3 = new AWS.S3(); | ||
const file = fs.createWriteStream(localFilePath); | ||
const params = { Bucket: "twitter-accounts-open-rec", Key: "accounts.db" }; | ||
s3.getObject(params).createReadStream().pipe(file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { exec } from "child_process"; | ||
import dotenv from "dotenv"; | ||
|
||
dotenv.config(); | ||
|
||
exec(`DATABASE_URL="${process.env.PROD_DATABASE_URL}" npx prisma studio`); |
Oops, something went wrong.