Search code examples
node.jsvue.jsmysqljsvue-ssr

How to use MySQL with Vue SSR directly without REST API backend?


I would like to use MySQL as the data source when fetching for the content during server side rendering so I don't need to create an external API server for the purpose of fetching the data from the database.


Solution

  • Vue js is client side language. Not for server side.
    For access mySql You must need to access via server side language like php, nodeJs, python.

    You can also follow some official documentation for better understand about server side rendering https://v2.vuejs.org/v2/guide/ssr.html