Skip to content

Instantly share code, notes, and snippets.

@bertolo1988
Created March 17, 2023 11:44
Show Gist options
  • Save bertolo1988/096d436f072d2513eb4ff1cd83201c47 to your computer and use it in GitHub Desktop.
Save bertolo1988/096d436f072d2513eb4ff1cd83201c47 to your computer and use it in GitHub Desktop.
Launches an EIP-1193 provider locally.
const ganache = require('ganache');
const options = {};
const server = ganache.server(options);
const PORT = 0; // 0 means any available port
server.listen(PORT, async (err) => {
if (err) throw err;
console.log(`ganache listening on port ${server.address().port}...`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment