Facing issue with the private network

Hi,

I have followed the below link to create a private network between two nodes.

I am running the daemon thruough my code written in Node js which is as follows:
const IPFS = require(‘ipfs’)
const node = new IPFS()

node.on(‘ready’, () => {
// start the API gateway
const Gateway = require(‘ipfs/src/http’);
const gateway = new Gateway(node);
return gateway.start();
})

I am getting the below error, Kindly someone help
/home/ubuntu/node_modules/libp2p/src/index.js:111
throw new Error(‘Private network is enforced, but no protector was provided’)

Thanks