[NDB] React with Node.js
npm run dev
"dev": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\""
Customer Map method for iterating
{ customers.map(c=> { return ( <Customer key={c.id} id={c.id} image={c.image} name={c.name} birthday={c.birthday} gender={c.gender} job={c.job}/> )}) }
Create AWS RDS
Free tier. MYSQL. Param group with UTF-8 general ci
HeidiSQL or Sequel Pro for mac
Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases.
Material UI
Similar to bootstrap but gives more powerful features for React. You don't have to know CSS in details.
Create database.json
and add the file on gitignore # database /database.json
view all customers API with MYSQL call
app.get('/api/customers', (req, res) => { connection.query( "SELECT * FROM CUSTOMER", (err, rows, field) => { res.send(rows); } ); });
Create a project called management
create-react-app management
VSC git issue with directory massive change
git add . git commit -m "whatever" git push origin master restart vsc
Git init and config
git init git config --global user.email "git이메일주소" git config --global user.name "git이름(별명)" git remote add origin "깃주소" git add . git commit -m "Init" git push origin master
JSONLint for Validation
https://jsonlint.com
Don't forget comma inside query
let sql = "INSERT INTO CUSTOMER VALUES (NULL, ?, ?, ?, ?, ?)"; NOT let sql = "INSERT INTO CUSTOMER VALUES (NULL, ? ? ? ? ?)";
install mysql using node
npm install --save mysql
create-react-app
npm install -g create-react-app
Download multer for arbitrary input file name
npm install multer --save
Start the project
npm start or yarn start
Invalid active developer path (git --version)
xcode-select --install
