How to change the code so that the nodejs connects to a local database instead of a remote one on Atlas?

Is your local mongodb a replica set?