Zero To One

setp2) fastify와 mongodb를 연결해보자 본문

WAS and Server

setp2) fastify와 mongodb를 연결해보자

Zero_To_One 2022. 3. 8. 11:39

1. 기본적으로 node가 설치되어 있어야 하고 node -v는 16버전이여야 한다.

 

 

2. https://github.com/fastify/fastify-cli

 

GitHub - fastify/fastify-cli: Run a Fastify application with one command!

Run a Fastify application with one command! Contribute to fastify/fastify-cli development by creating an account on GitHub.

github.com

위 페이지를 참고해서 설치해보자

 

npm install fastify-cli --global

3. 이 단계에서 fastify가 먹히지 않는다면 npm과 node를 삭제하고 다시 설치해 보자

fastify

4. 아래 명령어를 입력하면 root파일 등등이 깔려 있을 것이다.

fastify generate .

그럼 기본적인 세팅은 끝났다.