-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Re-op]KDT5_윤금엽_YoonGeumYeop_영화 검색 사이트 #70
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": ["prettier"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.parcel-cache | ||
dist | ||
node_modules | ||
.vercel | ||
.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"endOfLine": "lf", | ||
"singleAttributePerLine": true, | ||
"bracketSameLine": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import fetch from 'node-fetch'; | ||
|
||
const { APIKEY } = process.env; | ||
|
||
export default async function handler(request, response) { | ||
const { title, page, id } = JSON.parse(request.body); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
const url = id | ||
? `https://omdbapi.com?apikey=${APIKEY}&i=${id}&plot=full` | ||
: `https://omdbapi.com?apikey=${APIKEY}&s=${title}&page=${page}`; | ||
const res = await fetch(url); | ||
const json = await res.json(); | ||
response.status(200).json(json); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
http-equiv="X-UA-Compatible" | ||
content="IE=edge" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0" /> | ||
<title>FILMISE</title> | ||
|
||
<!-- cdn reset.css --> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css" /> | ||
|
||
<!-- Google fonts - Oswald, Roboto --> | ||
<link | ||
rel="preconnect" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. preconnect를 사용하여 font 파일을 들고오고 있네요:) 해당 속성이 어떠한 의미로 사용되고 있는지 또 어떤 효과가 있어서 추가한 것인지 설명해주실 수 있을까요? |
||
href="https://fonts.googleapis.com" /> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Oswald:wght@500&family=Roboto:wght@400;700&display=swap" | ||
rel="stylesheet" /> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="./src/main.scss" /> | ||
<script | ||
type="module" | ||
defer | ||
src="./src/main.js"></script> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.env
의 경우, 빌드 파라미터로 들어가는 것으로 알고 있는데 어떠한 방식으로 해당값을 넣는지 궁금합니다.