Development/Server

Development/Server

[Server] Query Parameter를 SQL에 계산해서 사용할 때 (feat. parseInt)

페이징 처리를 위해 클라이언트로 부터 Query Parameter로 page를 받도록 했다. 페이징 처리는 page와 numOfPage를 통해 limit 절로 SQL을 구성했는데, 클라이언트에서 처리를 쉽게 하기 위해 isExistNextPage를 따로 넘겨주고 있었다. const express = require('express'); module.exports = function () { const app = express(); // 중간 생략 } // 여기서 req는 Express.js를 통해 생성한 app의 request이다. const { numberOfPage, page } = req.query; 여기서 numberOfPage와 page는 클라이언트 쪽에서 아무리 Int 값을 넘겨준다고 하더라도,..

Development/Server

[Server] node-cron 스케쥴러 구현

crontab.guru/ Crontab.guru - The cron schedule expression editor loading... Cron job failures can be disastrous! We created Cronitor because cron itself can't alert you if your jobs fail or never start. Cronitor is easy to integrate and provides you with instant alerts when things go wrong. Learn more about cron job mon crontab.guru www.npmjs.com/package/node-cron node-cron A simple cron-like ta..

Development/Server

[Server] MySQL 외부 접속 허용 (AWS)

1. EC2 보안그룹 - 인바운드 규칙 편집 2. mysql 설정 파일 편집 ▶ cd /etc/mysql/mysql.conf.d ▶ vi mysqld.cnf ▶ sudo service mysql restart 3. 권한 설정 4. Workbench나 Datagrip 통해 외부 접속하기 출처 https://luji.tistory.com/7 https://support.plesk.com/hc/en-us/articles/360005493133-Unable-to-register-remote-MySQL-server-in-Plesk-Host-is-not-allowed-to-connect-to-this-MySQL-server

EUNJI HA
'Development/Server' 카테고리의 글 목록