constethweb=require('ethweb')constconfig={addr: 3000,//port of your local server (can be anything, but usually expressjs)privateKey: "0x1234...1234",// generate private key with Metamask or other wallettgappsAddress: "ws://SERVER_ADDRESS"// ethweb server}ethweb.connect(config,(err,info)=>{console.log(err,info)})// open 0xYOUR_ADDRESS.manipark.com// once you refresh your server you will receive instant public updates
when you just have static files
npm i ethweb -g
npm i express -g
constethweb=require('ethweb')constexpress=require('express')constapp=express();constconfig={addr: 3000,privateKey: "0x1234...1234",// generate private key with Metamask or other wallettgappsAddress: "ws://SERVER_ADDRESS"// ethweb serverstaticFilesFolder: './your_static_folder'}app.use(express.static(config.staticFilesFolder)).listen(config.addr,()=>{ethweb.connect(config,(err,info)=>{console.log(err,info)})})// open 0xYOUR_ADDRESS.ethweb.org// once you refresh your server you will receive instant public updates