No server will be "simple" to program
Understanding the basics of a server.
1. You have a network (private or the internet).
2. Devices (smartphone, pc, etc) connect to the network and are assigned an IP Address.
3. The IP Address shall be unique within the network.
4. All devices, if connected to a network, can exchange data within such network, but only on request.
5. A server is any device in the network that has the software to stay "open" for requests.
6. Usually, this software will have a UDP/TCP protocols listener, and will trigger actions and then transmission of data to the client that asked for something.
All servers follow these simple principles, whether they are Web, FTP, SMTP or any kind of server, the difference is "what do they transmit to the clients".
7. Any device can have more than one server (some mail, some ftp, some web). The kind of service is "ruled" by the port number the "request" bares.
Here's an article:
Build Your Own Web Server[
^]