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