Once MongoDB is running, create a directory and initialize it with
bun init.
terminal
Then add Mongoose as a dependency.
terminal
In
schema.ts, declare and export an Animal model.
In
index.ts, import Animal, connect to MongoDB, and add some data to the database.
Run the file with
bun run.
terminal
As you build your application, refer to the official MongoDB and Mongoose docs.