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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started