Boilerplate-mongomongoose- mongoose.connect

a crash loop? what is the problem here and how to fix it?
https://boilerplate-mongomongoose-1.zia73.repl.co
regards

Please post a link to your actual code instead of the live url you submitted.

Hin
you mean this one?

boilerplate-mongomongoose (1) - Node.js Repl - Replit
regards

First of all, you have not imported mongoose, so you will get mongoose is not defined error.

const personSchema = new mongoose.Schema({

thanks for this but after defining , still an error.

MissingSchemaError: Schema hasn’t been registered for model “undefined”.
Use mongoose.model(name, schema)
at Mongoose.model (/home/runner/boilerplate-mongomongoose-1/node_modules/mongoose/lib/index.js:526:13)

mongoose.connect()
var Person = mongoose.model();

These are not going to do anything useful for you. You should read the article that is referenced in this challenge. You will see how these are used.

Also, the first challenge in this section shows how to use mongoose.connect.

thanks these helped and worked.