Skip to content

Instantly share code, notes, and snippets.

@rkpattnaik780
Created August 6, 2019 04:00
Show Gist options
  • Select an option

  • Save rkpattnaik780/1ec86b22c3d24bf9709fbac4bcbf0e25 to your computer and use it in GitHub Desktop.

Select an option

Save rkpattnaik780/1ec86b22c3d24bf9709fbac4bcbf0e25 to your computer and use it in GitHub Desktop.
/server/models/user-model.js
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const userSchema = new Schema({
username: String,
name: String,
githubId: String,
image: String
});
const User = mongoose.model("user", userSchema);
module.exports = User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment