Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.MongoDB

Official
📦 Aspire.Hosting.MongoDBv13.6.0
15Functions
5Types

Types

Functions

methodaddDatabasebuilder
Adds a MongoDB database to the application model.
addDatabase(name: string, databaseName?: string): MongoDBDatabaseResource
methodaddMongoDBbuilder
Adds a MongoDB container resource
addMongoDB(name: string, port?: number, userName?: ParameterResource, password?: ParameterResource): MongoDBServerResource
methodaddMongoDBReplicaSetbuilder
Adds a MongoDB replica set resource to the application model.
addMongoDBReplicaSet(name: string, userName?: ParameterResource, password?: ParameterResource): MongoDBReplicaSetResource
methodwithBindIpAllbuilder
Configures the MongoDB server to bind to and listen on all network interfaces.
withBindIpAll(): MongoDBServerResource
methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a MongoDB container resource.
withDataBindMount(source: string, isReadOnly?: boolean): MongoDBServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a MongoDB container resource.
withDataVolume(name?: string, isReadOnly?: boolean): MongoDBServerResource
methodwithHostPortbuilder
Configures the host port that the Mongo Express resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): MongoExpressContainerResource
methodwithInitFilesbuilder
Copies init files into a MongoDB container resource.
withInitFiles(source: string): MongoDBServerResource
methodwithKeyFilebuilder
Sets up a keyfile for internal authentication between members of a MongoDB replica set, with the specified `keyValue` as the content of the file.
withKeyFile(keyValue: IExpressionValue, keyFilePath?: string): MongoDBServerResource
methodwithMemberbuilder
Adds a MongoDB server resource as a member of the replica set.
withMember(member: MongoDBServerResource): MongoDBReplicaSetResource
methodwithMongoExpressbuilder
Adds a MongoExpress administration and development platform for MongoDB to the application model.
withMongoExpress(configureContainer?: (obj: MongoExpressContainerResource) => Promise<void>, containerName?: string): MongoDBServerResource
methodwithReplbuilder
Adds a REPL command that opens an authenticated MongoDB shell in the dashboard terminal dock.
withRepl(): MongoDBServerResource
methodwithReplicaSetbuilder
Configures and initializes the MongoDB server as a single-member replica set for local development.
withReplicaSet(name?: string): MongoDBServerResource
methodwithTlsAllowInvalidCertificatesbuilder
Configures the MongoDB server to accept TLS connections whose peer certificate cannot be validated, by passing `--tlsAllowInvalidCertificates` to `mongod`.
withTlsAllowInvalidCertificates(): MongoDBServerResource
methodwithTlsModebuilder
Configures the `--tlsMode` the MongoDB server is started with when TLS is active.
withTlsMode(mode?: MongoDBTlsMode): MongoDBServerResource

Enums