Confused about error: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

I am attempting to live sync a Firebase realtime database with Algolia search. In my procfile I just have:

worker: node index.js

In code (index.js) I have:

const PORT = process.env.PORT || 5000;

const algoliasearch = require('algoliasearch');
const dotenv = require('dotenv');
const firebase = require('firebase');

// load values from the .env file in this directory into process.env
dotenv.config();

// configure firebase
firebase.initializeApp({
  databaseURL: process.env.FIREBASE_DATABASE_URL,
});
const database = firebase.database();

All I have is one worker node spun up, but I get the error: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

Any idea what I need to do to resolve this issue?

HI @daydreamerapp,

I’m not sure this is an Algolia issue. It appears to be an issues with the port. You may need to check that your .env is set correctly and that it is getting imported correctly.