How to check if schema already created in mongo db?

I am new to mongo Db and need to see if schema is already been created or not. I am using mongoose and node.js. If its not created i need to somehow run the creation script for once or else proceed with other stuff.

TIA

Assuming that by schema you mean that you want a check if the collection is already created in mongoDB, you should check this question here that explains the solution.

Quoting it:

Assuming you have a Mongoose Connection object named conn that's been opened using mongoose.createConnection, you can access the native mongo Db object via conn.db. From there you can call collectionNames which should provide what you're looking for:

 conn.db.collectionNames(function (err, names) {
     // names contains an array of objects that contain the collection names 
  }); 

You can also pass a collection name as a parameter to collectionNames to filter the results to just what you're looking for.