Since the absolute path of HTTP and the absolute path of linux files are essentially different, I want to find a software to act as a temporary HTTP server to assist me in web development.
Suppose the name of this software is server. I hope that when I enter a command, it will start immediately and treat all files in the current directory as static resources.
$ server --port 8080
The port opened by the software is 8080, and there is a demo.txt file in the current directory.
After that, I can ask the file through http://localhost:8080/demo.txt in the browser.
Is there such a linux software package?
I know that nginx can fulfill my test requirements, but for this kind of not particularly complicated function, configuring ningx is not very cost-effective.