LoginSignup
0
1

More than 3 years have passed since last update.

node.js x express.js x mysql x TablePlusでCRUD処理

Last updated at Posted at 2020-08-07

node.jsで基本のCURDをしてみた

参考にしたサイト
https://reffect.co.jp/node-js/express-js-connect-mysql#MySQL-3
こちらのサイトがとても解説が丁寧でわかりやすかった。

作成結果

ezgif.com-resize.gif

スクリーンショット 2020-08-08 1.55.09.png

実装方法は上記記事を参照
やってみて分かったことは感想に記述

【感想】

・node.jsのCRUDはphpと動きが似ている
・mysqlのDBとtableはjsファイル内で記述してサーバーが更新されると自動で作成される。
その後も更新のたびに新しく同じDBとtableを作成しようとしてエラーになるので、一度作ったDBとtableのjsファイル内の記述はコメントオフか削除が必要でした。
・table plusはやはり便利

TablePlus使い方

参考
https://reffect.co.jp/windows/tableplus-connect-mysql-sqlite

初期設定のパスワードやuserはmysqlのことなので、自分のユーザー名やパスワードではなく、
user:root(mysqlの場合)
パスワード:なし(mysqlの場合)
記述の保存は基本comand + s
基本クリックして登録、更新、削除をする
Data:データの登録、更新、削除
Structure: VARCHARやIDなどの編集

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1