본문 바로가기

기억 휘발 방지소

검색하기
기억 휘발 방지소
프로필사진 choice91

  • 분류 전체보기 (95)
    • Web (54)
      • JavaScript (14)
      • TypeScript (6)
      • Node.js (28)
      • CSS (2)
      • Spring (0)
    • Database (20)
      • MySQL (3)
      • mongoDB (3)
      • ORM (6)
      • ODM (8)
    • Flutter (6)
    • AWS (4)
    • OS (1)
      • Linux (1)
    • Algorithm (6)
    • 기타 (1)
    • 에러노트 (2)
Guestbook
250x250
Notice
Recent Posts
Recent Comments
Today
Total
«   2025/07   »
일 월 화 수 목 금 토
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
  • https
  • TailwindCSS
  • AWS
  • findByIdAndDelete
  • clipBehavior
  • EC2
  • MYSQL
  • mongodb
  • RDS
  • Express
  • wil
  • await
  • certbot
  • single quote
  • til
  • sequelize
  • double quote
  • Node.js
  • Nodejs
  • JavaScript
  • nginx
  • moment
  • TypeScript
  • atlas
  • mongoose
  • css
  • jsonwebtoken
  • Find
  • async
  • flutter
more
Link
Archives
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리
반응형

목록create (1)

기억 휘발 방지소

[Node.js / mongoose] mongoDB에 저장을 해보자

데이터를 저장하는 방법에는 두 가지 방법이 있다. save() create() 📌 Document.save() 먼저 자바스크립트 객체를 만들어줘야한다. // Post.js import mongoose from "mongoose"; const postSchema = new mongoose.Schema({ title: String, description: String, createdAt: Date, hashtags: [{ type: String }], meta: { views: Number, rating: Number, }, }); const Post = mongoose.model("Post", postSchema); export default Post; // postController.js import P..

Database/ODM 2021. 9. 20. 16:36
이전 Prev 1 Next 다음
반응형

Blog is powered by kakao / Designed by Tistory

티스토리툴바