Skip to content

mongodb-developer/bun-with-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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.

docker run --rm --init --ulimit memlock=-1:-1 -v .:/opt/app -p 3000:3000 -w /opt/app -e PORT=3000 oven/bun <params>

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.

git clone https://github.com/mongodb-developer/bun-with-mongodb
cd bun-with-mongodb
bun i
echo "MONGODB_URI=<your_atlas_connection_string>" > .env
bun run index.ts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published