一.直接安装remix-ide客户端
1.1 brew cask 安装remix-ide客户端
brew install --cask remix-ide
1.2 打开客户端,WORKSPACES选择localhost,默认在用户目录
1.3 选择file->Open Folder即可选择文件夹目录
二.使用浏览器连接本地文件夹
这种方式是使用浏览器IDE
2.1 安装remixd
npm install -g @remix-project/remixd
前置安装npm
2.2 指定连接文件夹路径
remixd -s 项目绝对路径(例:/Users/yourname/yourpath) --remix-ide https://remix.ethereum.org/
2.3 打开浏览器IDE
选择localhost
弹出对话框选择connect
可以看到已经连接到本地文件夹
三.启动本地浏览器IDE
由于我使用的是客户端,就没有在本地再启动本地的浏览器IDE,本地启动的浏览器IDE把命令中的url路径改为本地路径即可,具体端口改为你自己启动的端口
remixd -s 项目绝对路径(例:/Users/yourname/yourpath) --remix-ide http://localhost:6666/