Node.js/express.js
-
express 프로젝트 필요한것들Node.js/express.js 2022. 8. 1. 10:05
https://www.npmjs.com/package/sftp-upload sftp-upload Upload an entire directory to a remote sftp server.. Latest version: 1.0.4, last published: 3 months ago. Start using sftp-upload in your project by running `npm i sftp-upload`. There are 8 other projects in the npm registry using sftp-upload. www.npmjs.com sftp-upload 위한 라이브러리 npm i swagger-ui-express swagger-jsdoc API 명세서 만들기 위해 Swagger htt..
-
[express.js] - ec6 문법사용과 class 방식 db연동하기 sequize사용.Node.js/express.js 2021. 7. 8. 23:26
[1] 기본셋팅하기. npm install nodemon npm install --save mysql2 npm install --save sequelize "type": "module", "name": "server", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www", "nodemong": "nodemon ./bin/www" }, "type" : "module" 을 추가해준다. 이걸 추가함으로써 es6문법 import 사용가능 주의) node버전 13이상. "express": "~4.16.1", bin/www수정하기 www파일을 www.js로 수정 [2] 디렉토리 구조잡기 및 node문법 es6문법으로 전부 변경하기.
-
import bodyParser from "body-parser";Node.js/express.js 2021. 4. 27. 16:38
express.js 버전 4.16.1 npm install body-parser 이후 const bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); bodypaser에 줄이 그어져있으면서 'bodyParser' is deprecated.ts(6385) 왜 body-parser가 안되누... medium.com/@mmajdanski/express-body-parser-and-why-may-not-need-it-335803cd048c Express — body-parser and why may not need it Express 4.16+ gets r..