REACT_FULLSTACK [1]

김병훈·2021년 9월 12일
0

REACT-FULLSTACK

목록 보기
1/10
  • make a client, server folder

server

npm install express cors mysql2

  • after make a index.js file ,
    • try to node index.js

npm install nodemon

  • press ^c before npm install nodemon and maintain position in server folder.
  • in "scripts" of `package.json , add a "start": "nodemon index.js"
  • and try this

MySQL workbench

  • create schema TutorialDB
  • in server folder,

npm install sequelize sequelize-cli

  • and, sequelize init

problem during install sequelize and sequelize-cli

problem

  • zsh: command not found: sequelize

solving process

  • and delete migration , seeders folder
  • add a Post.js file in models folder

Post.js

  • these are names of column
    • and Post is the name of Table

in ./config/config.json

  • change infos to yours

data INSERT SUCCESSFULLY

https://victorydntmd.tistory.com/26

profile
블록체인 개발자의 꿈을 위하여

0개의 댓글