Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
env/*
!env/.env.example
*.log
.DS_Store
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 80,
"bracketSpacing": true,
"trailingComma": "all",
"semi": true,
"singleQuote": true
}
3 changes: 3 additions & 0 deletions env/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=
PORT=
DATABASE_URL=
23 changes: 23 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js';

export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2024,
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'prefer-const': 'error',
'no-var': 'error',
semi: ['error', 'always'],
quotes: ['error', 'single'],
},
},
];
34 changes: 34 additions & 0 deletions generated/prisma/browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file should be your main import to use Prisma-related types and utilities in a browser.
* Use it to get access to models, enums, and input types.
*
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
* See `client.ts` for the standard, server-side entry point.
*
* 🟢 You can import this file directly.
*/

import * as Prisma from './internal/prismaNamespaceBrowser.ts'
export { Prisma }
export * as $Enums from './enums.ts'
export * from './enums.ts';
/**
* Model Product
*
*/
export type Product = Prisma.ProductModel
/**
* Model Article
*
*/
export type Article = Prisma.ArticleModel
/**
* Model Comment
*
*/
export type Comment = Prisma.CommentModel
56 changes: 56 additions & 0 deletions generated/prisma/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[개선 권장 ⚠️] generated/ 폴더는 일반적으로 Git에 커밋하지 않습니다.

이유

  • prisma generate 명령으로 언제든 재생성 가능
  • PR diff에 불필요한 노이즈 추가 (이 PR에서만 +7,000줄)
  • merge conflict 발생 가능성
  • 저장소 용량 불필요하게 증가

권장 방법

1. .gitignore에 추가:

# Prisma
generated/

2. package.json에 postinstall 스크립트 추가:

{
  "scripts": {
    "postinstall": "prisma generate"
  }
}

이렇게 하면 npm install 실행 시 자동으로 Prisma Client가 생성됩니다.

3. 이미 커밋된 파일 제거:

git rm -r --cached generated/
git commit -m "chore: remove generated files from git"

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
*
* 🟢 You can import this file directly.
*/

import * as process from 'node:process'
import * as path from 'node:path'
import { fileURLToPath } from 'node:url'
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))

import * as runtime from "@prisma/client/runtime/client"
import * as $Enums from "./enums.ts"
import * as $Class from "./internal/class.ts"
import * as Prisma from "./internal/prismaNamespace.ts"

export * as $Enums from './enums.ts'
export * from "./enums.ts"
/**
* ## Prisma Client
*
* Type-safe database client for TypeScript
* @example
* ```
* const prisma = new PrismaClient()
* // Fetch zero or more Products
* const products = await prisma.product.findMany()
* ```
*
* Read more in our [docs](https://pris.ly/d/client).
*/
export const PrismaClient = $Class.getPrismaClientClass()
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
export { Prisma }

/**
* Model Product
*
*/
export type Product = Prisma.ProductModel
/**
* Model Article
*
*/
export type Article = Prisma.ArticleModel
/**
* Model Comment
*
*/
export type Comment = Prisma.CommentModel
Loading