Published on

Serve a static HTML page with ThirdWeb Embed

Authors

image

Serve a static HTML page with ThirdWeb Embed

ThirdWeb is an end to end developer tool accelerating teams building web3 apps, games, tokens, NFTs, marketplaces, DAOs and more. It enables users to add features such as NFTs, marketplaces, and social tokens to their Web3 projects with simple sdk or one liner code.

ThirdWeb has a feature called Embed which allows users to copy paste the embedded code into existing webpage, enabling people to mint/claim NFTs and tokens.

Using Outerbridge Webhook node, the embedded code can be easily copy paste to serve a static HTML page when a URL is accessed in a browser.

Steps

  1. Add Webhook node onto canvas

  2. In the Response Data input parameter, create a HTML page with the embedded code. For example:

     <!DOCTYPE html>
     <html>
     <head>
     <title></title>
     </head>
     <body>
    
     <iframe
         src="https://gateway.ipfscdn.io/ipfs/<ipfs>/erc721.html?contract=0x6a8c7F715D5f044437dA5b0576eD1289eC9b7eB6&chainId=5"
         width="100%"
         height="600px"
         style="max-width:100%;"
         frameborder="0"
         ></iframe>
    
     </body>
     </html>
    
  3. Try the node by clicking Open in New Tab

  4. Finally, Copy URL -> Save -> Deploy

  5. You now have a URL that you can use to allow people to mint/claim tokens using ThirdWeb Embedded Code.