Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[김현서] Week14 #452

Merged
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
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
Loading