Using Vue-Router Dynamic Routes to Load Data Chapter 9
You then have the products variable available to you in your app.js.
Advantages:
Less load in your code
No need to load the extra files required for processing the CSV
No extra steps required
Disadvantages:
Does not simulate the real world
If you want to update the CSV data, you need to convert, save, and assign to a
variable
Using a remote server
Another option is to upload the files to a remote, existing server and develop your app
there.
Advantages:
Simulates real-world development of loading CSV
Can be developed anywhere, with any machine
Disadvantages:
Can be slow
Needs to be connected to the internet
Needs to either set up a deployment process or edit files on a live server
Setting up local server
The last option is to set up a local server on your machine. There are several small,
lightweight, zero configuration modules, and applications, or there are bigger, beefier
applications too. If you have npm installed on your machine, the node HTTP server is
recommended. If not, there are other options available.
The other option would be to use a more heavyweight application, which can provide you
with an SQL database and the ability to run PHP applications. An example of this would be
MAMP or XAMPP.