RedisSession

BackEnd/Express.js

[Node.js/Express.js] Session, Interceptor 기능 완성

[Node.js/Express.js] Session, Interceptor 기능 개발 이전까지 세션과 인터셉터를 모두 개발 완료했다. 이제 매 요청 전 세션만 체크해주면 된다. 일단 해당 기능 적용 전 이전 글에서 Request 객체에 세션과 관련된 함수를 추가해주는 기능을 인터셉터로 변경해줬다. SessionManagerInterceptor class SessionManagerInterceptor extends HandlerInterceptor { /** * @type {SessionFactory} */ #sessionFactory; /** * @param {SessionStore} store */ constructor(store) { super(); this.#sessionFactory = new S..

BackEnd/Express.js

[Node.js/Express.js] Session, Interceptor 기능 개발 - RedisSession, MemorySession

[Node.js/Express.js] Session, Interceptor 기능 개발 HttpSession class class HttpSession { /** * @type { Map } */ #map #id constructor(id, map) { this.#map = new Map(); if (id) this.#id = id; if (map) this.#map = map; } /** * @param { string } name * @return { any } */ getAttribute = (name) => { return this.#map.get(name); } /** * @param { string } name * @param { any } attr * @return { void} */ setA..

djawnstj
'RedisSession' 태그의 글 목록