How to setup a minimal dns server which only resolves its own name?

I have a Raspi 3 A+ configured as WiFi access point, which has no internet connection. It only serves its own web application running on port 80.
The Raspi has a static IP address of, the first connected client gets via dhcp.
The /etc/hosts file on the Raspi contains a line: mybox
But I can’t access the web application using http://mybox on the client, only with
I assume I have to set up a minimal dns on the Raspi which only looks up in the hosts file, what is the best way to do that?

If you like to use an easy way, you can install one of our Adblocker PiHole or AdGuard Home. Both offer a web interface that can be used to configure your local DNS server. Maybe too heavy in your case but with less manual configuration steps needed.

Another option is to install a DNS server yourself. Could be Bind9 or dnsmasq. For both a lot of guides exist on the web.