일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 나의야근
- kotlinc
- 반갑지는않아
- 안할수가없네
- 편하게쓰자
- ubuntu_rg_cpu_100%
- 신기술은
- 날이새도록
- 야근은결국승리
- ERR_CERT_AUTHORITY_INVALID
- 해볼게
- HTML 자바스크립트 태그제거
- 코틀린
- 선택했을까
- 무과금살아남기
- checkupdates
- 정규식
- 복붙하기좋은
- ReactRouter6 다운그레이드
- 공부할시간이
- react
- vscode 수동업데이트
- 모던디자인테마
- ReactRouter 4
- 자바스크립트
- VSCode
- 시플플은영원하구나
- 리엑트라우터 구버전 살리기
- 리엑트
- ReactRouter withRouter
- Today
- Total
목록Service Developments/Node.js,Express (11)
필사(筆寫)
1. DISK IO 잡아먹으면서 들어가는 방법 import { promises as fs } from 'fs';import { pathToFileURL } from 'url'; const tempFilePath = './temp-bundle.mjs';await fs.writeFile(tempFilePath, bundledCode);const { default: Example } = await import(pathToFileURL(tempFilePath).href);await fs.unlink(tempFilePath); 2. 메모리에 담고 처리하는 방법import { createRequire } from 'module';const require = createRequire(import.meta.url);c..
https://nodejs.org/api/vm.html VM (executing JavaScript) | Node.js v22.5.0 DocumentationVM (executing JavaScript)# Source Code: lib/vm.js The node:vm module enables compiling and running code within V8 Virtual Machine contexts. The node:vm module is not a security mechanism. Do not use it to run untrusted code. JavaScript code can be compilednodejs.org 가끔 코어단 설계시 사용하는 vm 설계 구문 메모해두기engine.vm = a..
정상적으로 nginx 새버전이 설치되었다면1.27.1 은 http3 가 빌드하지 않고도 배치되어 있다. nginx -V 2>&1 | grep -o with-http_v3_module 아래와 같이 1.18 미리 설치되어 있다면 정리하고. ubunutu 20, 22 계열 기본 설치된 nginx 1.18 삭제 방법우분투에 기본적으로 설치 한 뒤 배치되어 있는 1.18을 삭제하는 방법은 아래와 같다. sudo apt remove nginx nginx-common nginx-core sudo apt purge nginx nginx-common nginx-core sudo apt remove nginx nginx-common sudo apt purgewesias7.tistory.com 간단하게, http {..
우분투에 기본적으로 설치 한 뒤 배치되어 있는 1.18을 삭제하는 방법은 아래와 같다. sudo apt remove nginx nginx-common nginx-core sudo apt purge nginx nginx-common nginx-core sudo apt remove nginx nginx-common sudo apt purge nginx nginx-commonsudo apt autoremove sudo apt update 이렇게 하면 보통 정리된다. nginx-full, nginx-core 등을 설치했다면 위 방식 활용해서 삭제할 것지운 뒤 다시 재설치하면 현재 nginx 공식 홈페이지에 게재된 stable 버전으로 설치 된다. 2024년 07월 19일 기준으로는 1.27.1 버전이 설치..
Error: ENOENT: no such file or directory, uv_resident_set_memory 리눅스/우분투 계열에서 위와 같은 메시지와 함께 nodejs express 데몬이 종료된다면, 여러가지 nginx 설정도 중요하지만 우분투에서 파일 접근 디렉티브 조정이 필요하다. $ulimit -n 했을때 1024라면, 파일 접근 가능 횟수가 부족할 수 있음으로서버 성능에 따라서 조정을 해주는 것이 맞다. root 계정을 사용할 때와 sudo root 처리하는 경우 둘다 작업해줘야 한다.ulimit 설정 이후 터미널을 종료하고 다시 들어와서 ulimit -n 숫자가 올바르게 변화했음을 체크해야 한다. 아스테리크를 써서 전역적인 설정은 아래와 같이 하며 sudo nano /etc/secur..
nodejs에서 GC는 정말 빠르게 잘 대응해줘야하는 녀석중 하나인데 좁은 메모리 환경을 보다 효율적으로 잘 쓰게 해주는 녀석이기도 하기에 아래와 같은 아주 짧막한 팁을 적어본다. let output = [....].join('') 간단한 배열 메모리 있다치면, 이를 비우는 과정도 중요한 관점이지만 이미 join을 통해 string 객체로 변환되어서 주소에 배정되었다 가정하면. output = null 이렇게 배정하면 해당 주소 기준으로 메모리를 끊는 과정은 있지만 GC가 다녀가기 전까지 배열로 변환했던 string 값은 메모리에 보관되는 경우가 있다. output = undefined 을 쓰자. 그럼 GC가 쓰레기로 판정후 해당 데이터를 지우러 빨리 와준다. 이는 다처리 구간에서 무척이나 아주 강렬하게..
npm install eslint --save and --save-devThe difference between --save and --save-dev may not be immediately noticable if you have tried them both on your own projects. So here are a few examples...Lets say you were bulding an app that that used the moment package to parse and display dates. Your app is a scheduler so it really needs this package to run, as in: cannot run without it. In this case..
http://sass.js.org/ 공식 홈페이지에 보면 libsass 라고 써있는 메뉴가 상단 우측에 보인다. 요녀석을 클릭하면, Playground Online 반가운 온라인 체험공간이 열린다. 놀이터다. 사스 같은 경우 여러 문법이 CSS를 보다 반복하지 말고 구조적으로 짜서 써라 라고 하는거니 반갑게 하면된다. 보통 그 요리 소재는 bootstrap4 기반으로 연습하다보면 확실히 실력이 빨리 늘 것이다. 매번 부트스트랩의 기능을 따다 쓰다, 이번엔 커스텀하기로 했다. Node Javascript 선호자라면 https://www.npmjs.com/package/node-sass Fully Javascript 선호자라면 http://sass.js.org 여기서 마음 껏 테스트해 볼 수 있다. http..
강의나 팁은 아닌데, 급하게 IP쳐봐야하는분들 아래와 같이 쓰시면됩니다. 접근요청자(Request Client)의 정보는 아래 객체에 담겨 있습니다. 아래를 쓰기 위해서는 nignx에서 X-Forwarded-For 값을 전달 받아줘야하는 과정이 좀 있습니다. https://cornswrold.tistory.com/442 [nginx] Proxy 환경에서 client IP 얻기 (정확한 ip 얻기) 문제점 프로젝트에서 nginx를 사용하기로 하여, nginx에 .vue 파일을 위치시키고 그 뒤에 springboot를 위치시켰다. nginx는 reverse proxy 역할을 하며, 클라이언트의 모든 요청을 받는다. 요청 URI가 /api로 cornswrold.tistory.com 요정보를 참고하세요. 아래는..
https://yarnpkg.com/lang/en/