Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(mongo-memory-server-createuser): add file
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
id: mongo-memory-server-createuser | ||
title: 'CreateUser' | ||
--- | ||
|
||
API Documentation of `CreateUser`-Interface | ||
|
||
## Values | ||
|
||
This Interface inherits most values from the `CreateUserMongoDB` interface, which is a interface for the `createUser` command manually types, see [#663](https://github.com/nodkz/mongodb-memory-server/issues/663) for tracking on switching to native interface. | ||
|
||
Because most values are inherited, only the new ones and important ones are described here. | ||
|
||
### database | ||
|
||
Typings: `database?: string` | ||
Default: `admin` | ||
|
||
Set the Database where the user will be added to, by default the user will be added to the `admin` database. | ||
|
||
### createUser | ||
|
||
Typings: `createUser: string` | ||
|
||
Set the username of the User to create. | ||
|
||
### pwd | ||
|
||
Typings: `pwd: string` | ||
|
||
Set the password of the User to create. | ||
|
||
### roles | ||
|
||
Typings: `roles: ({ role: UserRoles; db: string } | UserRoles)[]` | ||
|
||
Set the Roles the new User will have. | ||
For a list of available Roles, see the [MongoDB Documentation](https://www.mongodb.com/docs/manual/reference/built-in-roles/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters