API 2

[Web] ๊ฒ€์ƒ‰์„ ์œ„ํ•œ ์ข‹์€ RESTful URL์€ ์–ด๋–ค๊ฑธ๊นŒ?

https://stackoverflow.com/questions/5020704/how-to-design-restful-search-filtering How to design RESTful search/filtering? I'm currently designing and implementing a RESTful API in PHP. However, I have been unsuccessful implementing my initial design. GET /users # list of users GET /user/1 # get user with id 1 POST /u... stackoverflow.com ์ด๋ฒˆ์— ๋ฐฑ์—”๋“œ ์ž‘์—…์„ ํ•˜๋ฉด์„œ ๊ฒ€์ƒ‰์— ๋Œ€ํ•œ url์„ ์–ด๋–ป๊ฒŒ ๋งŒ๋“ค์ง€ ๊ณ ๋ฏผ์ด ์ƒ๊ฒผ๋‹ค. ์นดํ…Œ๊ณ ๋ฆฌ ์ด๋™ ๊ฒธ ๊ฒ€์ƒ‰..

Programming/Web 2022.01.19

[MariaDB / Node.js] retrieve connection from pool timeout after ์—๋Ÿฌ

MariaDB + Node.js + express.js ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ API์„œ๋ฒ„ - DB์„œ๋ฒ„๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ํ•œ ๋ฒˆ์”ฉ API ์„œ๋ฒ„์—์„œ DB์„œ๋ฒ„๋กœ query๋ฅผ ์ „๋‹ฌํ•˜์ง€ ๋ชปํ•˜๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ–ˆ๋‹ค. conn = await pool.getConnection(); pool.getConnection์—์„œ 10์ดˆ๋™์•ˆ connection์„ ๋ฐ˜ํ™˜ํ•˜์ง€ ์•Š์•˜๊ณ , ์ด ์‹œ๊ฐ„์ด ์„ค์ •๋˜์–ด์žˆ๋Š” acquireTimeout์„ ๋„˜์–ด๊ฐ€์„œ ์—๋Ÿฌ๋ฅผ ๋„์šฐ๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. pool.on("acquire", (conn) => { console.log(`acquire ${conn.threadId} has been acquire in pool`); console.log("acquire pool.activeConnections()", pool.acti..

Programming 2021.05.30