본문 바로가기

천줄코딩도 한 걸음부터

검색하기
천줄코딩도 한 걸음부터
프로필사진 supdev

  • 분류 전체보기 (45)
    • Others (41)
    • 생각들 (4)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • so Burn
«   2026/01   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
  • multidex
  • elemMatch
  • Linux
  • Java
  • window
  • instance
  • Setup
  • rest-assured
  • proguard
  • API테스트
  • centos
  • event-driven
  • Express
  • node
  • iIntelliJ
  • Mongo
  • react-native
  • Modulization
  • Mongoose
  • 다중 서버 명령
  • pbkdf2-password
  • OOP
  • Git
  • PBKDF2
  • memory structure
  • MEAN stack
  • Android
  • 64k method
  • MaridDB
  • ssh key
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Rest (1)

천줄코딩도 한 걸음부터

MongoDB를 통해 Node.js에서 간단한 REST API 구현

1. Model을 만든다.(=DTO or VO) models/user.jsmodels/user.js var mongoose = require('mongoose'); var Schema = mongoose.Schema; var userSchema = new Schema({ email: String, passwd: String, created_date: {type: Date, default: Date.now()} }); module.exports = mongoose.model('user', userSchema); 2.라우팅 파일 수정 routes/index.js routes/index.js 파일에 만들었던 User Model을 추가한다. 구현한 기능은 3가지 입니다. (1) POST /registMongoD..

Others 2017. 7. 6. 13:03
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바