Windows 下安装 Bun:像 Node 或 Deno 一样的现代 JavaScript 运行时

 安装解压软件:

sudo apt-get install unzip

 安装bun:

curl -fsSL https://bun.sh/install | bash

 

 

 跳转到root文件夹

无权限的解决办法:

chmod 777 /root/

打开.bashrc文件

vim .bashrc

输入i   进入编辑模式

在末尾处添加:

  export BUN_INSTALL="$HOME/.bun"
  export PATH="$BUN_INSTALL/bin:$PATH"

按esc按钮-》输入:wq保存退出

 系统不支持:

 升级ubuntu后:

 http.js:

// http.js
export default {
  port: 3000,
  fetch(request) {
    return new Response("Welcome to Bun!");
  },
};

 

 

参考链接:

https://blog.csdn.net/u013014254/article/details/125721140

https://lwebapp.com/zh/post/bun-windows

https://github.com/oven-sh/bun#bun-install

https://www.cnblogs.com/chenyirong/p/16342370.html

https://blog.csdn.net/carefree2005/article/details/117559312

http://ftp.gnu.org/pub/gnu/glibc/ 

https://blog.csdn.net/qq_37858386/article/details/109031071

posted @ 2022-08-22 12:06  徐同保  阅读(92)  评论(0)    收藏  举报  来源