How do I use my Android device as a web server by with an IP address and port? Just like a Wifi file transfer app in the Play Store?
Android itself does not provide such a facility (as to my knowledge). But there are a bunch of web servers available in the playstore. A German overview on AndroidPIT sums up some of them (grouped into suitable targets): Webserver (Google Translate's English variant: Webserver).
Some examples include static content webservers like e.g. kWS - Android Web Server and ServDroid.web, plain "HTTP file servers" like File Expert and WiFi File Transfer, more complex things even offering scripting support such as PAW Server for Android, or all-in-one solutions like Servers Ultimate.