Moralis Web3 from server to perform local web3 queries

I am thinking on writting a routing on node that uses moralis/node package to connect to a server ( ETH_LOCALDEVCHAIN: ‘0x539’, my ganache blockchain) and performs query using Moralis.Web3.

What i don’t realize is that i need also a wallet (i.e. Metamask) to get a provider to performe queries
i.e. web3.eth.getBlockNumber() againts my local blockchain dev network.

Here goes the snippet code:

const Moralis = require(“moralis/node”);
const Web3 = require(“web3”);

/* My Moralis Server connected to my local ganache-cli */
const serverUrl = “xxx”;
const appId = “xxx”;
const masterKey = “xxx”;

async function startServer() {
try {
await Moralis.start({ serverUrl, appId, masterKey }).then(function (result) { console.log(‘connected’,result);});
} catch(e) {
console.log('Error happend while connecting to the cloud server: ', e.message);


async function getBlockNumber() {
await Moralis.enableWeb3();
const web3 = new Web3(Moralis.provider);

maybe you can connect directly with a custom RPC url to your local ganache, and use a private key to make transactions

thanks crypto kid. i did that, and adjusted my code to replace in production the url of bsc super node. works fine. good advice.