If you are using cider-jack-in to start the REPL, remove the cider-nrepl dependency from the project.clj. If using cider-connect then update the version of cider-nrepl in project.clj to match the version of Cider
(System/getenv "PORT")
This will read the value of the PORT environment variable