728x90

nodejs 3

Nestjs 시작하기

Nestjs 시작하기 공식문서를 보면서 nestjs를 시작하려고 한다. 공식문서를 보면서 따라하는 것을 권장하나 빠르게 진행해보고 싶다면 이 글을 참고해도 좋을 것 같다. 본인이 다음에 환경을 구성할 때 quick start 할 때 참고할 글이기도 하다. node.js((> 10.13.0, v13을 제외한) 는 설치되어 있어야 한다. # 시작하려면 Nest CLI를 사용해 프로젝트를 스캐폴딩하거나 시작 프로젝트를 복제한다. $ npm i -g @nestjs/cli $ nest new project-name $ cd project $ npm run start # git 명령으로 프로젝트를 시작하는 방법 (위와 동일한 결과) $ git clone https://github.com/nestjs/typescri..

JS 2021.10.22

Node.js에서 Express로 웹 서버 구동 및 MongoDB 연결

Node.js에서 Express로 웹 서버 구동 및 MongoDB 연결 1. Node.js 설치 Node.js 공식 홈페이지에서 Node.js를 설치합니다. 2. Node.js 에서 웹 프레임워크인 express를 사용하여 웹서버 구동하기 express 공식 홈페이지의 샘플 소스코드를 받아서 웹 서버를 구동합니다. 1) express 설치 > npm install express --save 2) 코드 작성 후 실행 파일명 : index.js const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { res.send('Hello World!') }) app.listen(port, ..

JS 2021.06.14

GCP의 Ubuntu에 node.js 설치

GCP의 ubuntu에 node.js 설치 먼저 GCP를 이용해 만든 VM 인스턴스에 SSH 로그인 한 후 node.js 를 설치한다. github.com/nodesource/distributions/blob/master/README.md nodesource/distributions NodeSource Node.js Binary Distributions. Contribute to nodesource/distributions development by creating an account on GitHub. github.com node.js 공식 홈페이지에서 ubuntu 전용 node.js 를 설치하는 방법을 볼 수 있다. 필자는 Node.js LTS (v14.x) 버전을 설치했다. 아래 이미지는 직접 명령..

Infra 2021.05.07
728x90