const mongoose = require('mongoose')
const Schema = mongoose.Schema
const UserSchema = new Schema({
name: String
})
const UserModel = mongoose.model('user', UserSchema)
module.exports = UserModel
// Then you can import this model and use it in that way
/*
const UserModel = require('path_to_module')
const joe = new UserModel({
name: 'Joe'
})
*/