diff --git a/bin/www b/bin/www index 77516fe..628cb4c 100755 --- a/bin/www +++ b/bin/www @@ -19,7 +19,7 @@ db.once('open', function(){ console.log("Connected to mongod server"); }); -mongoose.connect('mongodb+srv://modak:'+'ehdgns2797'+'@modoc-mqsht.mongodb.net/sol?retryWrites=true&w=majority', {useUnifiedTopology: true , useNewUrlParser: true, +mongoose.connect('mongodb+srv://modak:'+''+'@modoc-mqsht.mongodb.net/sol?retryWrites=true&w=majority', {useUnifiedTopology: true , useNewUrlParser: true, useCreateIndex: true, useNewUrlParser: true }); diff --git a/model/post.js b/model/post.js index 33e0bf9..d476ac9 100644 --- a/model/post.js +++ b/model/post.js @@ -5,12 +5,12 @@ var Schema = mongoose.Schema // }) var postSchema = new Schema({ - title: {type:String, index:"text"}, // 구독 상품명 - subTitle: {type:String, index:"text"}, // 구독 짧은 설명 + title: {type:String}, // 구독 상품명 + subTitle: {type:String}, // 구독 짧은 설명 image: String, // 로고 type: String, // 월정액인지 content: String, - category: String, // 카테고리 + category: {type:String, index:"text"}, // 카테고리 price : Number, // 가격 like : {type:Boolean,default:false}, // 좋아요 눌렀는지 likeCount : Number,