https://github.com/mongodb-developer/bun-with-mongodb
https://github.com/mongodb-developer/bun-with-mongodb
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mongodb-developer/bun-with-mongodb
- Owner: mongodb-developer
- Created: 2024-07-10T18:02:35.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T18:12:49.000Z (12 months ago)
- Last Synced: 2025-03-28T00:06:32.057Z (3 months ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Running Bun With MongoDB
This is the code example for the Running Bun With MongoDB tutorial.
To run this project, you need to install bun, as explained on their [website](https://bun.sh).
>If you don't want to install bun, you can use the docker image `oven/bun` to run the project. Replace `bun` with the following command.
```bash
docker run --rm --init --ulimit memlock=-1:-1 -v .:/opt/app -p 3000:3000 -w /opt/app -e PORT=3000 oven/bun
```>ie. `bun install` becomes `docker run --rm --init --ulimit memlock=-1:-1 -v .:/opt/app -p 3000:3000 -w /opt/app -e PORT=3000 oven/bun install`
:::## TLDR
If you want to start with a MongoDB and Bun template, you can run the following commands.
```bash
git clone https://github.com/mongodb-developer/bun-with-mongodb
cd bun-with-mongodb
bun i
echo "MONGODB_URI=" > .env
bun run index.ts
```