To be clear, selenium server is not what's serving your application files. Instead, what selenium does is it listens for commands to send to the browser instance that it's controlling (those commands originate from your protractor tests).
Your own application server, and selenium server are two entirely separate servers, and it is still up to you to launch both before running protractor.
So to answer pretty much all of your questions, you don't need to tell protractor or selenium which specific HTML/JS files are being tested; rather, you simply tell protractor which URLs it should fetch by calling browser.get(url)
(or browser.driver.get(url)
if it's a non-Angular page) in your tests.
Note that your app server and selenium don't necessarily have to be running on the same machine, or even locally - it's possible to configure protractor so that it connects to an already-running remote instance of selenium by setting the seleniumAddress
property in protractor's configuration file. And likewise, you can tell protractor the base URL where your app is running by setting the baseUrl
property in that same file - however, in this case, make sure you're using that base URL in your tests by doing something like browser.get(ptor.baseUrl + '/path')
instead of hardcoding localhost
.