New answers tagged

1

Your admin.js is : const mongoose = require("mongoose"); let Schema = mongoose.Schema; Schema = new Schema({ User: { type: String, unique: true }, Pass: { type: String }, }); var Admin = mongoose.model("admin", Schema); module.exports = Admin; here you are exporting the identifier "Admin" . So when you import admin.js ...


Top 50 recent answers are included