Short answer: The easiest way is to not develop anything at all and instead use a service like Firebase.google.com.
Slightly longer answer : If you need something custom, the next easiest option is to write some code in a language well suited to servers, like NodeJS or Go. In Node you can use ExpressJS to stand up a simple server, and have it connect to your database or other servers. Go has Echo, which is crazy fast.
I specifically don’t recommend PHP because PHP lacks asynchronous functionality. Transitioning from PHP to NodeJS isn’t a huge undertaking.
Then you can take that code and either run it on a virtual server instance like Amazon EC2, or something lighter and easier to scale like Heroku or Amazon Lambda.
For databases you can run more instances to host your own or use a database service like DynamoDB or (again) Firebase.
Complete answer: If you need to ask, and you can’t use Firebase or equivalent for the entire back end, then a Quora answer won’t give you the depth of knowledge that you need to create a solid, reliable, and secure back end service. That takes years of experience.
So, this beautiful answer was given by Tim Mensch on Quora. It was relevent for this site. And many of us struggled with this. So I posted it here.
Thank you for reading.