ejs 템플릿 엔진 수업 복습!
TMDB 사이트에서 open api를 가져와서 현재 상영작을 home.ejs에 뿌려주기
Promise 함수를 사용해 비동기 처리를 했고,
Handlebars를 사용해서 뿌려줬다.
![스크린샷 2023-11-25 오후 6 47 19](https://private-user-images.githubusercontent.com/145528409/285578199-f3baaeed-e915-4d8c-ab92-6e618806a4d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5ODU0NzksIm5iZiI6MTcyNTk4NTE3OSwicGF0aCI6Ii8xNDU1Mjg0MDkvMjg1NTc4MTk5LWYzYmFhZWVkLWU5MTUtNGQ4Yy1hYjkyLTZlNjE4ODA2YTRkMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMFQxNjE5MzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZTM4Mzc5NDM3NzY1NzAwYzI2MGIzMzBmNmVkOTM1MmRiMjI4OWMyNTU4ZmU4MDg1ZTQwMzg1ZjVmNTUwODQzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Y_WtDNADJxXrRoI0MwglqDzal5cUaxstengAiVxTUW0)
![스크린샷 2023-11-25 오후 6 47 37](https://private-user-images.githubusercontent.com/145528409/285578201-5af09136-6227-410d-a44d-24f8d2ceb1b8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5ODU0NzksIm5iZiI6MTcyNTk4NTE3OSwicGF0aCI6Ii8xNDU1Mjg0MDkvMjg1NTc4MjAxLTVhZjA5MTM2LTYyMjctNDEwZC1hNDRkLTI0ZjhkMmNlYjFiOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMFQxNjE5MzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NDI4YWEzN2E1MTg2YWZkYzZjNWQzYzVhMTY5ZjVmNjhlZjNlNjU4ZTE1Yzk4NTkxZDBmMWE1NTVmNDMzY2NkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.9Dsccc2boXxGjGWCdzT_tubwIOkaY4irnQKn9_ayaSU)
- 구글firebase에 등록한 이메일 및 비밀번호를 입력 후 로그인버튼 클릭 시,
입력한 이메일 및 uid를 localStorage에 담아서 localStorage에 값이 있을 경우 로그인 상태 - 로그인 상태에서 숨겨놨던 버튼 (장바구니, 마이페이지, 로그인->로그아웃)이 보이게(.toggle()) 처리.
카카오 로그인 시, 카카오 로그아웃 버튼으로 설정. - 로그아웃 버튼 클릭 시, jquery에서 제공하는 함수 signOut()을 사용해서 로그아웃 처리.
로그아웃 시 localStorage.clear()를 사용해서 값 지우기.
![스크린샷 2023-11-26 오후 3 53 02](https://private-user-images.githubusercontent.com/145528409/285648980-9617313d-6bde-45e5-9466-5b22eed36a5b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ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jVlYmZiOTgyODdiMzhiYzgwYjU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.EHrP1aahRyB1gclmnRbjhTSaUaSJ20b32giGLAn04Oo)
- 카카오 에서 발급받은 api 키 중 javascript키를 사용해 카카오 로그인 구현.
로그인 시 id를 localStorage에 넣어 MyPage 대신 id를 넣어줌
- 카카오 로그인 시, 카카오 로그아웃 버튼이 보이게 해서 로그아웃 시
localStorage 값 지우기 및 카카오 로그인 토큰을 같이 지워줬다.
![스크린샷 2023-11-26 오후 8 51 33](https://private-user-images.githubusercontent.com/145528409/285649272-f829e25b-4f99-4ef9-9042-edb3fe29a97b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5ODU0NzksIm5iZiI6MTcyNTk4NTE3OSwicGF0aCI6Ii8xNDU1Mjg0MDkvMjg1NjQ5MjcyLWY4MjllMjViLTRmOTktNGVmOS05MDQyLWVkYjNmZTI5YTk3Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMFQxNjE5MzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mY2Q1ZmE2NzFiOWFiYmE4ZmJjNmE1OGU2YzlmZDlkMDRkOTc4MzM3ZDUxNDRmOTc5YWE2MDZlMTE4NDY5NThmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wfaAxW03es-kkEu37GpdVEUomC48nQ6MrDEp2WNXVM0)
![스크린샷 2023-11-26 오후 8 52 53](https://private-user-images.githubusercontent.com/145528409/285649274-314278c9-0943-4834-af84-cadde0dada08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5ODU0NzksIm5iZiI6MTcyNTk4NTE3OSwicGF0aCI6Ii8xNDU1Mjg0MDkvMjg1NjQ5Mjc0LTMxNDI3OGM5LTA5NDMtNDgzNC1hZjg0LWNhZGRlMGRhZGEwOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMFQxNjE5MzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMDU5N2RjNmVjNzM2ZjJkMjhhYTQ2NTFjMzhlOGQyZGZkMjliZDg0YzBkZGNkMWY3NWE1NTVkZDY0YjlhOGFkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.1kEOXvQnn8e5GifgXAvFatAtWLza1UVIVKpwKFgdzuA)
![2일차 결과화면_1](https://private-user-images.githubusercontent.com/145528409/285649631-dceb3347-1e97-4add-9125-7aa76cd81366.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5ODU0NzksIm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