Automattic / Automattic/mongoose

Specify connection config via an object and not string

Open
#10,339 14 comments 1 reaction 0 assignees View on GitHub
new feature
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
35

Description

Sorry if I'm blind, but how can I specify the connection with an object and not a string? E.g.

```js
mongoose.connect({
username: 'user123',
password: 'pass123',
host: 'mongodb0.example.com',
port: 1234,
})
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the mongoose.connect entry point and its existing connection configuration handling. Compare the requested object containing username, password, host, and port with the currently supported connection input, then establish whether object configuration should be supported and what completed behavior should be documented or tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.