Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testcontainers example #491

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

maxproske
Copy link

Adds an example using Testcontainers in a Docker Compose environment for local and cloud development, with or without a local Docker engine.

https://node.testcontainers.org/features/compose/


// const testContainersRedis = await import("@testcontainers/redis")
// const container = await new testContainersRedis.RedisContainer().withReuse().start()
// const client = await connectToRedis(container.getConnectionUrl())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we perhaps get rid of that?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@@ -0,0 +1,22 @@
import express from "express"
import { setupRedis } from "./setupRedis.js"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shall we get rid of .js? Or it's necessary? 🤔

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, b/c we use mjs Syntax

@aerabi
Copy link

aerabi commented Jun 11, 2024

I'd say let's also commit the lock file.

@johnjelinek
Copy link

Did devcontainers turn into testcontainers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants