mirror of
https://github.com/sstent/expressmongotest.git
synced 2026-01-26 17:12:33 +00:00
almost rebased
This commit is contained in:
9
chapter25/09_user_schema_unique_index.js
Normal file
9
chapter25/09_user_schema_unique_index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var UserSchema = new mongoose.Schema({
|
||||
username: {type: String, unique: true},
|
||||
name: String,
|
||||
password: String
|
||||
});
|
||||
|
||||
module.exports = UserSchema;
|
||||
Reference in New Issue
Block a user