일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- C lanuage
- H2O
- ubuntu
- 프래그먼트
- 한글
- C
- MySQL
- error
- java
- 안드로이드
- kakao
- 자바
- Portfolio
- it
- unity
- android
- NGINX
- techEmpower
- 해석
- server
- php
- mariadb
- 구글
- centOS7
- caddy
- 컴퓨터과학총론
- 개발
- 개발자
- 번역
- javascript
- Today
- Total
목록Server/node.js (20)
개발모음집
잘되던 서버 코드가 로컬 컴퓨터에서 서버로 옮기자 The \"data\" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined 에러가 발생하면서 안됐다. 에러 문제를 찾고 보니, env파일을 옮기지 않아서 그랬던 것이었다. 참고 : github.com/sysgears/apollo-universal-starter-kit/issues/827
아래 블로그를 보고 참고해서 설치했다. https://www.zerocho.com/category/NodeJS/post/59f0efe01dc7c80019aca9f1 서버 설치 후 git clone 하고 export NODE_ENV=production 설정하고 const dev = process.env.NODE_ENV === 'development'; const prod = process.env.NODE_ENV === 'production'; console.log(prod) if (prod) { const lex = greenlock.init({ packageRoot: __dirname, configDir: './greenlock.d', maintainerEmail: 'voiddeveloper91@gmai..
Error: The module '/Users/WebstormProjects/back/node_modules/bcrypt/lib/binding/bcrypt_lib.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 67. This version of Node.js requires NODE_MODULE_VERSION 79. Please try re-compiling or re-installing node_module 폴더 삭제 후 # npm i
./certbot-auto renew 출처 : https://swiftcoding.org/lets-encrypt-renew 에러 발생 Attempting to renew cert (dd.kro.kr) from /etc/letsencrypt/renewal/dd.kro.kr.conf produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping. All renewal attempts failed. The following certs could not be renewed: /etc/letsencrypt/live/dd.kro.kr/fullchain.pem (failure) pm2로 서버가 동작하..
(node:47343) UnhandledPromiseRejectionWarning: Error: Unknown column 'board.level' in 'field list' board테이블에 level 컬럼이 있음에도 위와 같은 에러가 발생하였다. SELECT board.lv FROM BOARD as board LEFT JOIN MEMBER as user ON board.idx=user.idx; 위의 sql문을 아래의 sql문으로 변경해주니 해결됨 SELECT 'board.lv' FROM BOARD as board LEFT JOIN MEMBER as user ON board.idx=user.idx; 참고 : https://m.blog.naver.com/PostView.nhn?blogId=eyeball..
serverStatus가 3이라고 나와서 뭐가 문제인지 찾아보니까 https://github.com/mysqljs/mysql/issues/1089 트랜잭션을 release 해야한다고 한다. 트랜잭션 release하는 코드를 까먹었다. await connection.commit(); if (connection) await connection.release();
password_hash($password,PASSWORD_BCRYPT) 위의 코드같이 php password_hash로 저장한 데이터를 bcrypt.compare(input.password, database.password.replace(/^\$2y(.+)$/i, '\$2a$1'), function(err, result) { console.log(result); }); 위 js 코드로 확인할 수 있다. 출처 : https://stackoverflow.com/questions/27928873/passwordsalt-hashing-and-verifying-in-php-and-or-nodejs
const totalCount = await connection.query( "SELECT count(*) as count FROM ??", ['posts'], ); 값을 sql 문의 파라미터로 넘길 때, sql문 값에 ? 한 번만 써주면 됐는데, 테이블명은 ??로 써줘야 파라미터를 써줘야한다. 출처 : https://github.com/mysqljs/mysql#preparing-queries