id 값 문제인데 해결을 못하겠습니다.
미해결
비전공자를 위한 진짜 입문 올인원 개발 부트캠프
local host 로 들어가서 축구공위에 마우스를 올리면 아래 products/0 으로 나옵니다.. 물론 클린하면 아무데이터도 나오지 않고 2번쨰 그림을 클릭하면 1번째 상세 정보가 표출됩니다. db값은 id:1 2 3 으로 되어 있으나, localhost 상에는 0, 1, 2 로 표기되있는듯 합니다. 왜 값을 일치 시키지 못하는지 강의를 다시 보면서 문제를 찾아봐도 잘 해결이 되지 않습니다. ㅠ 아직 이해가 많이 부족한듯 합니다. 설명 부탁드립니다. < Switch > < Route exact = {true} path = { "/" } > < MainPageComponent /> </ Route > < Route exact = {true} path = "/products/:id" > < ProductPage /> </ Route > < Route exact = {true} path = "/upload" > < UploadPage /> </ Route > </ Switch > app . get ( "/products/:id" , ( req , res ) => { const params = req . params ; const { id } = params ; models . Product . findOne ({ where : { id : id , }, }). then (( result ) => { console . log ( "PRODUCT : " , result ); res . send ({ product : result }); }). catch (( error ) => { console . error ( error ); res . send ( "상품 조회에 에러가 발생했습니다." ); }); }); 그리고... 해당 강의 전의 SQLite 데이터 순서와 현재강의의 데이터 순서가 선생님은 바뀌었는데... 저는 그렇지 않습니다.. ㅠㅠ 이것까지만의 드립니다. app . get ( "/products" , ( req , res ) => { models . Product . findAll ({ order : [[ "createdAt" , "DESC" ]], attributes : [ 'id' , 'name' , 'price' , 'createdAt' , 'seller' , 'imageUrl' ], }) . then (( result ) => { console . log ( "PRODUCTS : " , result ); res . send ({ products : result }); }). catch (( error ) => { console . error ( error ); res . send ( "에러 발생" ); }) });
- api
- dayjs
- express
- node.js
- react-native
- HTML/CSS
- tensorflow
- nodejs
- javascript
- react
- 머신러닝 배워볼래요?





