BackEnd 21

[Node.js] NestJS - HTTP module (return type Observable -> Promise)

아래 공식문서 페이지를 참조하여 글을 작성했습니다. Documentation | NestJS - A progressive Node.js framework Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Progamming), FP (Functional Programming), and FRP (Functional Reac docs.nestjs.com @Injectable() export class TestService ..

BackEnd/Node.js 2022.11.20

[GraphQL] NestJS 프로젝트에 적용하기 2 (Resolver chains 문제 해결)

아래 공식문서를 참고하여 작성했습니다 Resolvers How Apollo Server processes GraphQL operations www.apollographql.com Documentation | NestJS - A progressive Node.js framework Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Progamming), FP (Functional Programming), and FRP (..

BackEnd/GraphQL 2022.11.06

[GraphQL] NestJS 프로젝트에 적용하기 1 (Query, Mutation)

NestJS 공식문서를 참고하여 작성했습니다 Documentation | NestJS - A progressive Node.js framework Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Progamming), FP (Functional Programming), and FRP (Functional Reac docs.nestjs.com 1. 터미널 CLI로 GraphQL 사용을 위한 npm을 설치 > npm i ..

BackEnd/GraphQL 2022.11.06

[MySQL 8.0] Node.js 프로젝트에서 MySQL 연동 오류 해결

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client -> 연동시 설정한 username, host가 사용자로 등록되어 있지 않을때 발생하는 오류같습니다! 1. 터미널로 MySQL bash 접속 docker exec -it mysql-local bash 저는 도커로 mysql을 설치했으며 이름은 'mysql-local'로 되어있어서 위에처럼 터미널에 입력했습니다. 상황에 맞게 변경해서 해주세요. 2. 루트계정으로 접속 /# mysql -u root -p Enter password: test 저는 root 계정의 비밀번..

BackEnd/RDBMS 2022.10.30

[Node.js] Socket.IO 사용해서 채팅방 구현하기

Get started | Socket.IO In this guide we’ll create a basic chat application. It requires almost no basic prior knowledge of Node.JS or Socket.IO, so it’s ideal for users of all knowledge levels. socket.io Socket.IO 공식문서 사이트에 가면 빠르게 채팅을 만들어 보는 예시가 있다. 처음에 이대로 만들어보고 조금씩 발전시켜나가는 방향으로 구현해봤다. 1. socket.io 서버 연결 http 서버를 생성하고 socket.io 서버에 넣어 socket을 사용하기 위한 'io'를 만들었다. "localhost:3000" 으로 들어가면 보여줄 ht..

BackEnd/Node.js 2022.09.15

[Node.js] 모듈 exports하고 imports해서 다른모듈 사용하기

A모듈 내에 있는 A서비스에 있는 메서드를 B모듈 내 컨트롤러에서 사용하고 싶은 경우! AModule.ts -AService를 내보내기 @Module({ controllers: [AController], providers: [AService], exports: [AService], }) export class AModule { } AService.ts @Injectable() export class AService { getHi(){ return "Hi"; } BModule.ts -AModule을 가져오기 (A모듈안에 A서비스가 있기 때문) @Module({ imports: [AModule], controllers: [BController], providers: [BService], }) export c..

BackEnd/Node.js 2022.07.01

[MongoDB] Mac환경에서 MongoDB 설치하기

https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/ 1. 몽고디비 최신버전 설치하기 $ brew tap mongodb/brew $ brew update $ brew install mongodb-community@5.0 2. 사용자 계정폴더에 가서 data폴더를 만들고 그안에 db폴더 만들기 3. 데이터 저장 폴더 지정하고 실행 확인 $ sudo mongod --dbpath ~/data/db $ brew services start mongodb-community@5.0 $ brew services stop mongodb-community@5.0 4. 몽고디비 접속 확인 $ mongo MongoDB shell version v5.0.7..

BackEnd/NoSQL 2022.06.23

[SQL_MyBatis] Insert문 실행하고 추가된 행의 원하는 컬럼 값 리턴받기 (selectKey사용)

저는 MyBatis과 Oracle를 사용했습니다. INSERT INTO EATAEWONBBS (SEQ, ID, NICKNAME, TITLE, CONTENT,PICTURE, HASHTAG, WDATE, SHOPNAME, ADDRESS, LATITUDE, LONGITUDE, READCNT,LIKECNT,shopphnum,shopurl, testurl) VALUES (bbsseq.NEXTVAL, #{id}, #{nickname}, #{title}, #{content}, 0, #{hashtag}, SYSDATE, #{shopname}, #{address}, #{latitude},#{longitude}, 0, 0,#{shopphnum},#{shopurl},#{testurl}) 원래 SEQ값을 만들어둔 bbsseq..

BackEnd/RDBMS 2022.04.07

[Oracle] ORA-00054 : resource busy and acquire with nowait specified or timeout expired

select, insert, update, delete문 실행하고 commit을 안한채로 drop문 실행시 나타나는 오류라고한다. (까먹지말고 커밋을 꼭해주자!!) system 계정으로 접속하고 아래 select문을 실행해준다. select c.owner, c.object_name, c.object_type, b.sid, b.serial#, b.status, b.osuser, b.machine from v$locked_object a, v$session b, dba_objects c where b.sid = a.session_id and a.object_id = c.object_id; ALTER SYSTEM KILL SESSION 'sid,serial#'; 그리고 나오는 표에서 SID와 SERIAL#으로..

BackEnd/RDBMS 2022.03.25

[Oracle, Sqlplus] Oracle11g 한글깨짐 해결중...

https://imthekingofcoding.tistory.com/4 SQL Developer 한글설정하기 - For MAC 맥에서 SQL Developer 툴을 사용할때 한글로 설정하는법 SQL Developer 앱 오른쪽 버튼 -> 패키지내용 보기 -> Contents -> Resources -> sqldeveloper -> sqldeveloper -> bin bin 폴더 선택 후 command + c 한.. imthekingofcoding.tistory.com https://im-codding.tistory.com/17 [ Oracle ] 오라클 한글 깨짐 현상 안녕하세요 코띵입니다 :D CentOS에서 오라클 설치를 완료한 후, SQLPlus를 통해 접속을 했는데, 다음과 같이 한글이 나오지 않..

BackEnd/RDBMS 2022.03.16