From 26b3e852efbe3eac9eb713e5d8e1f9a526988544 Mon Sep 17 00:00:00 2001 From: kodemon Date: Thu, 17 Apr 2025 17:36:24 +0000 Subject: [PATCH] feat: update readme --- LICENSE | 3 +++ README.md | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/LICENSE b/LICENSE index e5587da..bc8953f 100644 --- a/LICENSE +++ b/LICENSE @@ -8,6 +8,9 @@ Software, and to permit persons to whom the Software is furnished to do so, subj The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +**Commercial use is permitted, provided the Software is not sold, relicensed, or distributed as a stand-alone solution, whether in original or minimally modified form. +Use as part of a larger work, integrated product, or service is allowed.** + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 32016e1..20a7b37 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Test container solution for running third party solutions through docker. ## Quick Start +We have quick start support for `postgres` and `mongodb`. + +### Postgres + ```ts import { PostgresTestContainer } from "@valkyr/testcontainers/postgres"; @@ -20,3 +24,16 @@ console.log(container.url("db")); // => postgres://postgres:postgres@127.0.0.1:5 await container.stop(); ``` + +### MongoDB + +```ts +import { MongoTestContainer } from "@valkyr/testcontainers/mongodb"; + +const container = await MongoTestContainer.start(); + +console.log(container.url()); // mongodb://user:pass@127.0.0.1:27017 +console.log(await container.client.db("admin").command({ ping: 1 })) // { ok: 1 } + +await container.stop(); +```