Skip to content

Commit

Permalink
Merge pull request #452 from khs0727/part3-김현서-week14
Browse files Browse the repository at this point in the history
[김현서] Week14
  • Loading branch information
devToram authored May 20, 2024
2 parents 4b83fd3 + 4715e16 commit 9c87efd
Show file tree
Hide file tree
Showing 106 changed files with 1,606 additions and 1,089 deletions.
102 changes: 0 additions & 102 deletions weekly-mission/next-project/components/ActionButton/ActionButton.jsx

This file was deleted.

18 changes: 0 additions & 18 deletions weekly-mission/next-project/components/Button/Button.jsx

This file was deleted.

34 changes: 0 additions & 34 deletions weekly-mission/next-project/components/Context/ModalContext.jsx

This file was deleted.

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions weekly-mission/next-project/components/Footer/FooterIcon.jsx

This file was deleted.

71 changes: 0 additions & 71 deletions weekly-mission/next-project/components/Input/InputField.jsx

This file was deleted.

19 changes: 19 additions & 0 deletions weekly-mission/next-project/db/dbConnect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MongoClient } from "mongodb";

const url =
"mongodb+srv://hs0727:hsjh1004!@cluster0.aeptwaq.mongodb.net/check-email?retryWrites=true&w=majority&appName=Cluster0";
const options: any = { useNewUrlParser: true };

let cachedClient: MongoClient | null = null;

export async function connectDB(): Promise<MongoClient> {
if (cachedClient) {
return cachedClient;
}

const client = new MongoClient(url, options);
await client.connect();

cachedClient = client;
return client;
}
18 changes: 18 additions & 0 deletions weekly-mission/next-project/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
declare module "*.module.css" {
const classes: { [key: string]: string };
export default classes;
}

// global.d.ts

import type { MongoClient } from "mongodb";

declare global {
namespace globalThis {
var _mongo: Promise<MongoClient>;
}
}

declare module "*.png";
declare module "*.jpg";
declare module "*.svg";
Loading

0 comments on commit 9c87efd

Please sign in to comment.