const mongoose = require('mongoose'); const conString = 'mongodb://127.0.0.1:27017/emp'; mongoose.connect(conString); const employeeSchema = new mongoose.Schema({ name: { type: String, required: true }, city: { type: String, required: true }, salary: { type: Number, required: true } }); const Employee = mongoose.model('Employee', employeeSchema); module.exports = { Employee };