How We Coding

[Lambda] node-gyp

JS/Node.js2019. 5. 16. 00:31

C++ Addons as AWS Lambda functions

https://nodeaddons.com/c-addons-as-aws-lambda-functions/

 

C++ Addons as AWS Lambda functions

C++ Addons as AWS Lambda functions

nodeaddons.com

 

 

https://stackoverflow.com/questions/30340443/cross-compile-node-module-with-native-bindings-with-node-gyp

 

Cross-compile node module with native bindings with node-gyp

I'm using AWS Lambda, which involves creating an archive of my node.js script, including the node_modules folder and uploading that to their infrastructure to run. This works fine, except when it ...

stackoverflow.com

 

'JS > Node.js' 카테고리의 다른 글

[정리] 아하 REST API 서버 개발 #3  (0) 2019.03.31
[정리] 아하 REST API 서버 개발 #1, #2  (0) 2019.03.31
[Node.js] How to store emoji in MySQL  (0) 2019.02.03

'JS > Node.js' 카테고리의 다른 글

[Lambda] node-gyp  (0) 2019.05.16
[정리] 아하 REST API 서버 개발 #1, #2  (0) 2019.03.31
[Node.js] How to store emoji in MySQL  (0) 2019.02.03

'JS > Node.js' 카테고리의 다른 글

[Lambda] node-gyp  (0) 2019.05.16
[정리] 아하 REST API 서버 개발 #3  (0) 2019.03.31
[Node.js] How to store emoji in MySQL  (0) 2019.02.03

[JS] import / export

JS/JS(ES6+)2019. 2. 11. 00:33

'JS > JS(ES6+)' 카테고리의 다른 글

[JS] 느낌표로 시작하는 함수  (0) 2019.02.11
[JS] require(), module.exports, exports  (0) 2019.01.25
[JS] Symbol (ES6)  (0) 2019.01.20

'JS > JS(ES6+)' 카테고리의 다른 글

[JS] import / export  (0) 2019.02.11
[JS] require(), module.exports, exports  (0) 2019.01.25
[JS] Symbol (ES6)  (0) 2019.01.20

DataBase Schema 에서 default collation 을 utf8 - default collation 에서 utf8mb4 - utf8mb4_unicode_ci 로 변경


테이블의 특정 칼럼의 collation 을 Table default 에서 utf8mb4 - utf8mb4_unicode_ci 로 변경


NodeJs - sql connection options 에 charset : 'utf8mb4' 추가


포스트맨에서는 정상적으로 보임.



utf8 인코딩은 3바이트까지 지원하는데 이모티콘은 4바이트를 차지하기 때문에 문제가 발생한다고 한다. 

이를 해결하기 위해 MYSQL 5.5.3 부터 4바이트를 지원하는 utf8mb4라는 캐릭터 셋이 추가되었다.

그러므로 이모티콘을 지원하기 위해서는 테이블의 캐릭터 셋을 utf8에서 utf8mb4로 변경하면 된다.



Reference


https://hackernoon.com/today-i-learned-storing-emoji-to-mysql-with-golang-204a093454b7


https://stackoverflow.com/questions/46764071/node-js-mysql-some-string-encodings-emoji-are-throwing-errors-when-i-try-to-i?rq=1


https://bluesh55.github.io/2016/10/11/mysql-emoji/

'JS > Node.js' 카테고리의 다른 글

[Lambda] node-gyp  (0) 2019.05.16
[정리] 아하 REST API 서버 개발 #3  (0) 2019.03.31
[정리] 아하 REST API 서버 개발 #1, #2  (0) 2019.03.31

'JS > JS(ES6+)' 카테고리의 다른 글

[JS] import / export  (0) 2019.02.11
[JS] 느낌표로 시작하는 함수  (0) 2019.02.11
[JS] Symbol (ES6)  (0) 2019.01.20

[JS] Symbol (ES6)

JS/JS(ES6+)2019. 1. 20. 00:35

'JS > JS(ES6+)' 카테고리의 다른 글

[JS] import / export  (0) 2019.02.11
[JS] 느낌표로 시작하는 함수  (0) 2019.02.11
[JS] require(), module.exports, exports  (0) 2019.01.25

- 여러 공백을 하나의 공백으로 바꾸는 정규표현식

- ref : https://code.i-harness.com/ko-kr/q/1e3ba5



str.replace( / +/g, ' ' )        ->  790ms

str.replace( /  +/g, ' ' )       ->  380ms

str.replace( / {2,}/g, ' ' )     ->  470ms

str.replace( /\s\s+/g, ' ' )     ->  390ms

str.replace( / +(?= )/g, ' ')    -> 3250ms



- 문자열에서 모든 줄 바꿈(개행)을 제거하는 방버

- ref : https://code.i-harness.com/ko-kr/q/a4df85


someText = someText.replace(/(\r\n\t|\n|\r\t)/gm,"");



- 정규표현식을 사용하여 태그만 제거하기

- ref : https://webisfree.com/2015-12-22/[자바스크립트]-정규표현식을-사용하여-태그만-제거하기


var newText = oriText.replace(/(<([^>]+)>)/ig,"");


>> g : 발생할 모든 pattern에 대한 전역 검색

>> i : 대/소문자 구분 안함

>> ref : http://www.codejs.co.kr/자바스크립트에서-replace를-replaceall-처럼-사용하기/



- 특정 태그 추출

- ref: http://maedoop.dothome.co.kr/2231

- ref: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec

'JS > Reference' 카테고리의 다른 글

How to make a Web Crawler in Node.js  (0) 2018.11.24
How JS works  (0) 2018.10.02
이벤트 루프(Event Loop)  (0) 2018.10.02

1. How to make a web crawler in JavaScript / Node.js 

http://www.netinstructions.com/how-to-make-a-simple-web-crawler-in-javascript-and-node-js/



2. “Introduction to Webcrawling (with Javascript and Node.js)” - “Introduction to Webcrawling (with Javascript and Node.js)” @DDCreationStudi

https://medium.com/of-all-things-tech-progress/introduction-to-webcrawling-with-javascript-and-node-js-f5a3798ee8ac

'JS > Reference' 카테고리의 다른 글

[JS] 정규표현식을 이용한 str.replace() / pattern.exec()  (0) 2018.12.26
How JS works  (0) 2018.10.02
이벤트 루프(Event Loop)  (0) 2018.10.02