게시판2 [ NODEJS ] 4. express 게시판 ( delete 로 데이터 삭제 ) * 게시판의 삭제 업무 flow 는 아래 그림과 같습니다. 1. list 에서 update 링크로 이동합니다. 2. update 화면에서 삭제 호출을 위한 버튼 및 ID 전달 내용을 추가 합니다. update.ejs * update view 화면 (삭제 버튼 클릭 시 router 에 삭제 로직 실행 됩니다.) 3. router 에서 삭제를 위한 메소드를 추가 합니다. let mime = require('Mime'); let path = require('path'); let mariadbModule = require(__BASE + 'dataaccess/mariadbConn'); module.exports = function(app, fs) { //app.use 로 받으면 method 에 관계 없이 호출 .. 2021. 9. 23. [ NODEJS ] 3. express 게시판 ( update 로 데이터 수정 ) * 구현하고자 하는 예제의 flow 는 아래와 같습니다. 1. /list URL 을 호출 하였을 때의 결과를 수정합니다. (기존 list 구현은 https://shonm.tistory.com/657 를 참고해 주세요) list.ejs 구현 내용: list 출력에 link 로 TEST_ID 를 /update URL에 전달합니다. TEST_ID TEST_NAME 2. update view 호출을 위한 Router 설정을 아래와 같이 추가 합니다. testRouter.js let mime = require('Mime'); let path = require('path'); let mariadbModule = require(__BASE + 'dataaccess/mariadbConn'); module.exports.. 2021. 9. 23. 이전 1 다음