How do I render in blender 2.8 to get the same result as I see in viewport?
Turn transparent ON in Film in Rendering Settings.

Go to Shader editor, choose World, add environnement node (open your HDRI here), mapping node, and texture coordinate and set it up like so. in mapping node you can change HDRI orientation by changing Z rotation value.

That should answer all your questions.