From ac3260895a1bd4db140df545d4f512caf1853736 Mon Sep 17 00:00:00 2001 From: Supan Adit Pratama Date: Sat, 26 Oct 2024 19:17:58 +0700 Subject: [PATCH] chore: env and prisma init --- .env.example | 7 +++++++ prisma/schema.prisma | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .env.example create mode 100644 prisma/schema.prisma diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..153f9d9 --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# Environment variables declared in this file are automatically made available to Prisma. +# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema + +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings + +DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..ee282c7 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,14 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? +// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +}