Skip to content

Instantly share code, notes, and snippets.

View edanisko's full-sized avatar
👓

Ed Anisko edanisko

👓
View GitHub Profile
@edanisko
edanisko / app.d.ts
Created April 26, 2023 02:08
SvelteKit Globals /app.d.ts
import type { PrismaClient } from '@prisma/client'
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
@edanisko
edanisko / prisma.ts
Last active April 26, 2023 02:10
SvelteKit - Prisma - /src/lib/server/prisma.ts
import { PrismaClient } from '@prisma/client'
// Avoid instantiating too many instances of Prisma in development
// https://www.prisma.io/docs/support/help-articles/nextjs-prisma-client-dev-practices#problem
let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.prisma) {
@edanisko
edanisko / schema.prisma
Created April 26, 2023 01:54
Prisma Schema for Phones
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model users {
<html>
<head>
<title>Livewire App</title>
@livewireStyles
</head>
<body>
Livewire App
@livewireScripts
</body>