Remix 搭建與簡單使用,並支持外部訪問


Remix 搭建與簡單使用,並支持外部訪問

轉 https://blog.csdn.net/linshenyuan1213/article/details/83444911

remix是基於瀏覽器的在線編譯器,鑒於網絡問題,可能存在登不上去的問題,因此 ,可以搭建自己本地的Remix。

    本文是基於virtalbox的ubuntu1804的虛擬機環境,配置是1核2GB內存(建議內存越多越好)。

官方在線編譯器

https://ethereum.github.io/browser-solidity

https://remix.ethereum.org

推薦使用在線編譯器

  1. 1. 安裝本地Remix:
    1. 安裝

官方地址: https://github.com/ethereum/remix-ide

方式一:已經做為npm的一個module了

apt install npm

npm install remix-ide -g

啟動命令:

remix-ide

方式二:

git clone https://github.com/ethereum/remix-ide.git

cd remix-ide

npm install

npm run build && npm run serve

  1. 本地訪問Remix:http://127.0.0.1:8080

2.遠端訪問特定機器的remix

本文使用npm自動安裝remix的路徑是

/usr/local/lib/node_modules/remix-ide

修改

vim /usr/local/lib/node_modules/remix-ide/bin/remix-ide

server.listen(8080, '127.0.0.1', function () {})

修改為

server.listen(8080, '0.0.0.0', function () {})

之后重啟remix-ide

即可外部訪問。

3.界面如下

至此,Remix算是配置完成了。

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM