ESP8266 custom web server

This is impossible to do directly for the reason already explained, but you can with something in the middle with paid services like Blynk or similar.
I've done a similar job with the help of free Google Firebase account (at least up to a certain usage limit which is more than enough for a single user).

Using "stream" callback, every time an event was generated remotly from Firebase, the ESP clients reacts as programmed.

For example, I've done a simple GPIOs status list page (with the help of Vue framework, but it's not mandatory off course), and this webpage can be hosted both on ESP8266 flash memory, or in a remote webserver (for tests, I've used free space on Github)

So data can be "pushed" from both side: from ESP->(Firebase)->Server when a GPIO state change or from Server->(Firebase)->ESP when user click on a button.

@akc4 : how is the progress on your side?

@noiasca absolutely poorly so far, reading documentation trying to understand some stuff. So far the closest thing to what I am trying to reproduce is what @cotestatnt posted with firebase. However, I don't use firebase.

I think what I will try to do now is to run websocket server on my website and from the arduino listen to the websocket channel. But, I quickly figured that is far from easy since I want to use Pusher. Found an old library, but unfortunately it's deprecated and no longer updated.

@akc4 WebSocket is a very good choice, but you have to be able to setup a websocket server on your web hosting account, or as alternative, start the WS server on the ESP side and have remote access to your device (public IP or, open ports on the router etc etc)

Anyway, if you want take a look to Firebase approach, I've updated my tests with "plain" JavaScript, HTML and CSS.
The library used with ESP is <Firebase_ESP_Client.h> and the repo for webserver files and ESP firmware is this one

Off course you have to create a your Firebase project and put your credentials in config.js file and in ESP esp_firmware_firebase.ino sketch (check README of library for detailed how-to).

In my example, anyone with a Google account can register (whitin the daily limits) because I've enabled also "Google Sign-in" method for authentication because it is just for test.

@cotestatnt thanks, I also took a look at your vue repo, I am familiar with Vue. However I will go the websocket route instead of firebase, never worked with firebase really.
For the websocket server I'll use laravel either setup pusher/laravel-websocket or socket io. I found this library last updated 2 years ago