PB : Redux-Saga Handler Function > Api Request using 'useQuery' from 'apollo/client' > above Error Handler Function API CALL ❤ What is 'Invalid Hook Call' ? link : https://ko.reactjs.org/docs/hooks-rules.html Hooks Rule 1) Only call 'Hook' in React Function , Not in Normal Javascript Function Call Hook in React Function Component OR Call Hook in 'Custom Hook' Trial 1 : change 'ReqGetAllShips ' function into Custom Hook link
http://www.passportjs.org/docs/authenticate/ Trial 1. Custom Callback Function "router" router.post('/login', function(req, res) { passport.authenticate('local', function(err, user, info) { console.log("let's see") if (err) { return res.status(404).json({ message : 'failed'}) } if (!user) { // * Display message without using flash option // re-render the login form with a message console.log("unauthorized !!!") console.log
** 기초과정 - 1) 기존 img 파일들 경로 모두 가져오기 2) 새로운 파일 있을 경우, 새로운 변수 담아서 Data_Form에 담기 > 각각 이름을 다르게 하기 > backend에서도 각각의 파일들을 수정시, 다른 fieldname을 토대로 수정하기 ( multer : upload > 다양한 fieldname 부여하기 ) 3) 백엔드에서, req.body에는 항상 기존 img 파일 경로가 담겨 있을 것이다 4) 각각의 img 파일 여부, 및 첨부파일 여부에 따라서, 있을 경우, 원래 경로에 있던 이미지 삭제하는 과정도 넣기 ( 어차피 req.files ~ 를 통해 확인된다는 것은, 이미 업로드가 되었다는 것이므로, 삭제 과정만 추가적으로 거치면 된다 ) fs unlink 동기적 처리 > promise : Flow Control 원래 소스 코드 의도한 대로라면, err 와 관련된 모든 콘솔들이 다 찍히고 마지막에 req.files
I want to send both files and text through post request 1st trial : Make my own object and add all the texts and files with the ( key : value ) For example and send it thorought Fetch api with JSON.stringfy It is sending the Object Datas to the backend but since I am ... making 'Datas' object to "string" the file included in the 'Datas' is not recognized properly as the 'file' in the bac
Error 1) Route Passport 1st Trial : add 'failureRedirect' It worked, It was going back to '/' So Now I have to handle how to deal with fail cases It seems like. passport middleware is not receving the info properly from the info sent from the client Solution : 1) add '{usernameField: 'id',passwordField: 'password'}' 2) app.use(bodyParser.urlencoded({ extended:
To Do 1. Make card that shows Video that I uploaded First of All, I had to set the html , specifically actual "card" I thought of making unique function that makes html for video ex. function make_video() BUT since I am using ejs, I decided to make usage of it, which means that, I used "for loop" to show the video on html pages after I sent the data to client from server Server Code Html Code 2. C.R.U.D on Video 2.1 Add "text" under "video" that describes on vi
To Do 1. Upload "Profile_Videos" into AWS Server 2. Put "Video" links into DB Pb: pushing url into Array of MongoDB Focus at "$push", instead of $set, which I used to upload image and save it into mongoDB 3. Add Upload Video html Pb1 : Use Modal https://www.youtube.com/watch?v=V08wXKHF_Xw > JS > Scss > Html Pb3 : Video Redirect > If No Video is Selected, Then send error and redirect Then the Error Occured https://www.youtube.com/watch?v=rKTlakY8
I decided to create a real website which is upgraded version of my first personal project At this time, I am addressing server, backend using Node.js To do 1. Registration Page 1_1) Loading HTML file Loading Html page into Node.js Route want to bring below page to below route 1) registe