I want to create website (html, css , js) and its mobile app counterpart (Flutter) with same backend code for both (Express, mongoDB)
I get to know about REST API should be used for these kinda stuff. I will create REST API using Express. But
REST API only send json data to client and let the client side do whatever it want. But how would i send html documents from server then ?
E.g usually when we visit homepage the server send us index.html (or any template view). If i use REST i would have to send only data not html files then how files will be served by server
Do i have to make separate codes for serving html files & sending data? Then which file will be executed when say node filename.js ?
What about it's mobile app ? How it will get data ?