As soon as you have logged in the MongoDB shell, you can create a fresh database in MongoDB by using the use command:
> use nuxt-app
You should get the following result:
switched to db nuxt-app
However, note that it is the same when you want to select an existing database:
> use admin
You should get the following result:
switched to db admin
If you want to drop a database, first select the database using the use command, for example, use nuxt-app, followed by the dropDatabase function:
> db.dropDatabase()
You should get the following result:
{ "dropped" : "nuxt-app", "ok" : 1 }
The next thing we will learn is how to create or add collections to the database that we have created.