Question: this is my app.js and the Marks file const mongoose = require('mongoose') const eventSchema = new mongoose.Schema({ stdname: { type: String, required: true }, stdid:

this is my app.js
and the Marks file
const mongoose = require('mongoose')
const eventSchema = new mongoose.Schema({
stdname: {
type: String,
required: true
},
stdid: {
type: String,
required: true
},
Quiz1: {
type: String,
required: true
},
Quiz2: {
type: String,
required: true
},
MedExam: {
type: String,
required: true
},
FinalExam: {
type: String,
required: true
},
Total: {
type: Number,
required: true
},
Grade: {
type: String,
required: true
},
})
let Marks = mongoose.model('Marks', eventSchema, 'Marks')
// The ability to call from any file
module.exports = Marks
----------------------------------
I try to refresh the browser and clear cached + cookies but still not solve the problem
// mongoose.set('strictQuery', false); app.get('/', (req, res) ={ res.redirect('/Marks') a) res.render('Marks') \}) //bringg events routes const marks = require('./routes/marks-routes') app.use('/Marks', marks) // bring ejs template app.set('view engine', 'ejs') //bring static folder app.use(express.static('public')) app.use(express.static('uploads')) app.use(express.static('node_modules'))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
