Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
irfnrdh committed Feb 11, 2024
1 parent 0e53041 commit 14c7b3f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
13 changes: 12 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
API = 123456
DBNAME = "mydb"
AUTH_ORIGIN = "https://localhost:3000"
AUTH_SECRET = "dfsdfsdf3f3f3453fdfsdfsdj2k3lj4k23j4lk2j3lk4j2lkjflkdsjflkjds"
AUTH_SECRET = "dfsdfsdf3f3f3453fdfsdfsdj2k3lj4k23j4lk2j3lk4j2lkjflkdsjflkjds"



POSTGRES_URL="postgres://default:TCOyQm6tM9RV@ep-lingering-smoke-a1v62b72-pooler.ap-southeast-1.aws.neon.tech:5432/verceldb?sslmode=require"
POSTGRES_PRISMA_URL="postgres://default:TCOyQm6tM9RV@ep-lingering-smoke-a1v62b72-pooler.ap-southeast-1.aws.neon.tech:5432/verceldb?sslmode=require&pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NO_SSL="postgres://default:TCOyQm6tM9RV@ep-lingering-smoke-a1v62b72-pooler.ap-southeast-1.aws.neon.tech:5432/verceldb"
POSTGRES_URL_NON_POOLING="postgres://default:TCOyQm6tM9RV@ep-lingering-smoke-a1v62b72.ap-southeast-1.aws.neon.tech:5432/verceldb?sslmode=require"
POSTGRES_USER="default"
POSTGRES_HOST="ep-lingering-smoke-a1v62b72-pooler.ap-southeast-1.aws.neon.tech"
POSTGRES_PASSWORD="TCOyQm6tM9RV"
POSTGRES_DATABASE="verceldb"
21 changes: 19 additions & 2 deletions server/utils/db.instance.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
import { Sequelize } from "sequelize";


// SQLITE
// export const sequelize = new Sequelize({
// dialect: "sqlite",
// storage: "./mydb.sqlite",
// logging: false,
// });


// POSTGRES SQL

export const sequelize = new Sequelize({
dialect: "sqlite",
storage: "./mydb.sqlite",
dialect: "postgres",
host: "ep-lingering-smoke-a1v62b72-pooler.ap-southeast-1.aws.neon.tech", // or your PostgreSQL host
port: 5432, // or your PostgreSQL port
username: "default",
password: "TCOyQm6tM9RV",
database: "verceldb",
logging: false,
});



// MYSQL

// const { Sequelize } = require('sequelize');

// const sequelize = new Sequelize('database', 'username', 'password', {
Expand Down

0 comments on commit 14c7b3f

Please sign in to comment.