DEV Community

Abhay Prajapati
Abhay Prajapati

Posted on

6 3

So tried bun! the new JS runtime.

bun-scripts

Installation

$ curl https://bun.sh/install | bash
Enter fullscreen mode Exit fullscreen mode

after this i opened my .bashrc and added the following line:

BUN_INSTALL="/root/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
# as it wasn't added automatically, i added it manually
Enter fullscreen mode Exit fullscreen mode

i restarted my terminal and it worked! πŸŽ‰

working with .env and bun

# then i did a fancy stuff
echo PORT=5000 >> .env
touch http.js
Enter fullscreen mode Exit fullscreen mode
// http.js
console.log(process.env.PORT)
// USING ENVIRONMENT VARIABLES WITHOUT DOTENV MODULES.
Enter fullscreen mode Exit fullscreen mode
bun run http.js
Enter fullscreen mode Exit fullscreen mode

bunrun

checkout the code @repo

sugggest me what should i try next with bun

🀝🏾Connect me on:
Twitter: πŸ•ŠοΈ@Abhayprajapati_
Github: 🐧@theabhayprajapati

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (4)

Collapse
 
lexlohr profile image
Alex Lohr β€’

PSA: Running everything (but especially shell scripts from the web) as root is dangerous. It's not a coincidence that on Linux, user accounts have limited permissions.

Collapse
 
ankush981 profile image
Ankush Thakur β€’

And?

Collapse
 
theabhayprajapati profile image
Abhay Prajapati β€’

it was great 😁

Collapse
 
ankush981 profile image
Ankush Thakur β€’

Cool! ^.^ I think your post should've been about the "it was great" part and why it was great, but all fine. :P

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay