# Aspire.Hosting.MongoDB

- Module: `Aspire.Hosting.MongoDB`
- Version: `13.4.0`
- Source: [GitHub](https://github.com/microsoft/aspire)
- Functions: `7`
- Types: `3`

## Types

- [MongoDBDatabaseResource](/reference/api/typescript/aspire.hosting.mongodb/mongodbdatabaseresource.md) -- `handle` - 4 members -- A resource that represents a MongoDB database. This is a child resource of a {@ats-ref type:MongoDBServerResource}.
- [MongoDBServerResource](/reference/api/typescript/aspire.hosting.mongodb/mongodbserverresource.md) -- `handle` - 14 members -- A resource that represents a MongoDB container.
- [MongoExpressContainerResource](/reference/api/typescript/aspire.hosting.mongodb/mongoexpresscontainerresource.md) -- `handle` - 1 members

## Functions

- [addDatabase](/reference/api/typescript/aspire.hosting.mongodb/adddatabase.md) -- `method` -- Adds a MongoDB database to the application model.
- [addMongoDB](/reference/api/typescript/aspire.hosting.mongodb/addmongodb.md) -- `method` -- Adds a MongoDB container resource
- [withDataBindMount](/reference/api/typescript/aspire.hosting.mongodb/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a MongoDB container resource.
- [withDataVolume](/reference/api/typescript/aspire.hosting.mongodb/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a MongoDB container resource.
- [withHostPort](/reference/api/typescript/aspire.hosting.mongodb/withhostport.md) -- `method` -- Configures the host port that the Mongo Express resource is exposed on instead of using randomly assigned port.
- [withInitFiles](/reference/api/typescript/aspire.hosting.mongodb/withinitfiles.md) -- `method` -- Copies init files into a MongoDB container resource.
- [withMongoExpress](/reference/api/typescript/aspire.hosting.mongodb/withmongoexpress.md) -- `method` -- Adds a MongoExpress administration and development platform for MongoDB to the application model.
