I am using Node on a pi zero running raspbian stretch lite. 

I basically want to have two processes running, one process is to keep a connection open to the server to push and receive messages like offline status and the other is to scan for iBeacons.

Would it be best practice to create one project and have two JSfiles and start them separately using something like PM2? Or would it be better to have two completely separate projects? The one process kind of relies on the other as I will be updating the beacons to scan for via the open connection.