Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribedthis 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions