본문 바로가기

기타2/Nodejs12

버전체크 npm-check-updates https://www.npmjs.com/package/npm-check-updates npm-check-updates Find newer versions of dependencies than what your package.json allows. Latest version: 12.3.0, last published: 9 days ago. Start using npm-check-updates in your project by running `npm i npm-check-updates`. There are 392 other projects in the npm registry www.npmjs.com npm install -g npm-check-updates ncu 명령어로 가능업데이트 확인 ncu -u로 버.. 2022. 2. 17.
NodeJS: PM2 Startup on Windows[2022-10-19] https://github.com/jessety/pm2-installer 아래 썻던 모듈 pm2-windows-service [DEPRECATED] 로 인해 변경 해당 파일을 다운후 해당 폴더로 이동해서 명령어실행시 완료 npm run configure npm run configure-policy npm run setup -- 서비스가 시작되지 않는 문제https://github.com/jessety/pm2-installer/issues/8 ============================================ blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75 NodeJS: PM2 Startup on Windows How to deal.. 2021. 5. 6.
Error: Connection lost The server closed the connection uhou.tistory.com/125 Connection lost: The server closed the connection 에러 해결하기 Node.js와 mysql, AWS EC2, S3, Nginx 등을 연동하여 백엔드 작업을 하고있는데 가끔씩 'Error: Connection lost: The server closed the connection.' 이라는 에러로그가 뜨면서 웹 사이트에 접속이 되지 않을.. uhou.tistory.com stackoverflow.com/questions/20210522/nodejs-mysql-error-connection-lost-the-server-closed-the-connection nodejs mysql Error: Connection lost The ser.. 2020. 11. 30.
크롤링 github.com/bda-research/node-crawler github.com/simplecrawler/simplecrawler github.com/cheeriojs/cheerio github.com/ktty1220/cheerio-httpcli github.com/puppeteer/puppeteer 무엇을쓸것인가. puppeteer와 cheerio의 조합 + 크론잡 node-cron, node-schedule 둘중하나 선택 github.com/node-cron/node-cron github.com/node-schedule/node-schedule --- cheerio만 사용한다면 iconv를 써서 해결해야되지만 github.com/bnoordhuis/node-iconv cheerio-httpcli.. 2020. 10. 29.
nvm 노드설치시 다양한 버전을 사용하기위해서 nvm을 이용하면 편하게 사용할수있다. https://github.com/nvm-sh/nvm nvm-sh/nvm Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions - nvm-sh/nvm github.com 위의 사이트에서 nvm의 기본정보를 알수있다. 윈도우 사용자라면 그냥 https://github.com/coreybutler/nvm-windows coreybutler/nvm-windows A node.js version management utility for Windows. Ironically written in Go. - coreybutler.. 2019. 11. 28.
https://nodejs.org/ https://nodejs.org/ Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 안쓰면 까먹는다. 빠르게 다시예전에 했던부분까지 하나씩 다시 진행한다. 해당 홈페이지에서 그냥 다운받아서 설치만해도 노드가 실치된다 12.13.1 LTS버전 기준으로 진행한다. 2019. 11. 28.
multer 1. 원하는것file을 업로드하여 저장하고싶다.2. 검색검색결과 multer에 대한 추천내용이 많았다.https://www.npmjs.com/package/multer3. 적용사용법에 대한 한글문서https://github.com/expressjs/multer/blob/master/doc/README-ko.md 설치$ npm install --save multer const multer = require("multer");//파일저장위치 지정 및 파일용량 조절const upload = multer({ dest: 'public/uploads/',limits: { fileSize: 5 * 1024 * 1024 }}); app.post('/upload',upload.single('img_file'), func.. 2018. 8. 9.
Express에서 정적 파일 제공 1. 저장된 이미지를 불러오고싶다.2. Express에서는 정적 파일 제공을 이용한다.http://expressjs.com/ko/starter/static-files.html 해당형태로 추가해주면 접근이 가능하다.app.use('/static', express.static(__dirname + '/public')); http://localhost:3000/statc/images/test1.jpg 이미지외에도 정적파일을 전부 가져오는게 가능하다. 2018. 8. 9.
cors 1. 에러 Failed to load http://AAAA: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://BBB' is therefore not allowed access. The response had HTTP status code 404.2. 원인현재 도메인과 다른 도메인에서 리소스가 요청될경우 보안상으 이유로 데이터를 받을 수 없다.RESTful API기반으로 통신할때 API서버와 웹서버의 페이지가 달라서 CORS제한이 걸리게된다. 자세한 설명은 요기서 https://developer.mozilla.org/ko/docs/Web/HTTP/Access_control_CORS CORS.. 2018. 8. 9.