-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
1 parent
b7e9bbf
commit f986290
Showing
7 changed files
with
427 additions
and
155 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,14 @@ | |
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets. | ||
|
||
# The database URL is used to connect to your PlanetScale database. | ||
# DATABASE_URL=mysql://USERNAME:[email protected]/DATABASE_NAME?ssl={"rejectUnauthorized":true} | ||
DB_HOST='aws.connect.psdb.cloud' | ||
DB_NAME='YOUR_DB_NAME' | ||
DB_USERNAME='' | ||
DB_PASSWORD='pscale_pw_' | ||
|
||
# @see https://next-auth.js.org/configuration/options#nextauth_url | ||
AUTH_URL='http://localhost:3000' | ||
AUTH_REDIRECT_PROXY_URL="http://localhost:3001/api" | ||
|
||
# You can generate the secret via 'openssl rand -base64 32' on Unix | ||
# @see https://next-auth.js.org/configuration/options#secret | ||
|
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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import * as dotenv from "dotenv"; | ||
import type { Config } from "drizzle-kit"; | ||
|
||
dotenv.config({ | ||
path: "../../.env", | ||
}); | ||
dotenv.config({ path: "../../.env" }); | ||
|
||
if (!process.env.DATABASE_URL) { | ||
throw new Error("DATABASE_URL is not set"); | ||
} | ||
const uri = [ | ||
"mysql://", | ||
process.env.DB_USERNAME, | ||
":", | ||
process.env.DB_PASSWORD, | ||
"@", | ||
process.env.DB_HOST, | ||
":3306/", | ||
process.env.DB_NAME, | ||
'?ssl={"rejectUnauthorized":true}', | ||
].join(""); | ||
|
||
export default { | ||
schema: "./schema", | ||
driver: "mysql2", | ||
dbCredentials: { | ||
connectionString: process.env.DATABASE_URL, | ||
}, | ||
dbCredentials: { uri }, | ||
tablesFilter: ["t3turbo_*"], | ||
} satisfies Config; |
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
Oops, something went wrong.