title: How to connect server to Binance Smart Chain using the Web3.js library?
body: <p>I'm trying to connect my small server web app in ExpressJS to the BSC blockchain, but without success.</p>
  <p>As per my understanding, the Web3 library provides all the required stuff under the hood, and I can connect by calling</p>
  <p><code>new Web3(new Web3.providers.HttpProvider(urlToRpcNode))</code></p>
  <p>By following this, I put the following into my function, which serves as a Web3 object init:</p>
  <p><code>return new Web3(new Web3.providers.HttpProvider(https://bsc-dataseed1.binance.org));</code></p>
  <p>According to BscScan, the given argument is the URL to the RPC Node for BSC <a href="https://bscscan.com/apis#rpc" rel="nofollow noreferrer">https://bscscan.com/apis#rpc</a>.</p>
  <p>Unfortunately, awaiting this call just gets stuck forever and doesn't return anything.</p>
  <p>What am I doing wrong? Any help is appreciated.</p>
  <p>Edit:</p>
  <p>I found another link to Binance Docs, where it outlines the specific process for connecting to BSC. Here is how they do it:</p>
  <p><code>const web3 = new Web3('https://bsc-dataseed1.binance.org:443');</code></p>
  <p><a href="https://docs.binance.org/smart-chain/developer/create-wallet.html#connect-to-bsc-network" rel="nofollow noreferrer">https://docs.binance.org/smart-chain/developer/create-wallet.html#connect-to-bsc-network</a></p>
  <p>Unfortunately, this gives me the same result.</p>