반응형

에러 라인

error Delete '.....' prettier/prettier

  1 error and 0 warnings potentially fixable with the `--fix` option.

 

해결방법 

npm run lint -- --fix

 

 

반응형
반응형

app.post("주소" , function(req,res) {

     for(var i= req.body.length; i++)

     {

//추가할 data

          req.body[i].c1 = "c5"

          req.body[i].c2 = "c4"

          req.body[i].c3 = "c3"

          req.body[i].c4 = "c2"

          req.body[i].c5 = "c1"

      }

});

반응형

'프로그램 관련 > Node js' 카테고리의 다른 글

warnings potentially fixable with the --fix Error  (0) 2021.11.04
node bit 변경시 주의사항  (0) 2021.09.30
반응형

db.collection.renameCollection("collectionName")

   (컬렉션이름)                      (변경할컬렉션이름)

 

db.collection.updateMany({_id: 1234}, {$rename : {"g1", "g2"}} )

                                    (조건)                    (변경전: 변경할값)

 

반응형

'프로그램 관련 > 몽고DB' 카테고리의 다른 글

mongodb index 정리  (0) 2021.10.19

+ Recent posts