How can I use a node package in Vue (Vue server-side)?

I’m new to Vue, new to glitch, but have been doing web development since about 1995.

I’m trying to create a Vue project that can read a CSV file on the server and parse the data. I’d like to use this package (as it seems fairly complete) but I can’t figure out how to use it in the context of Vue as it is a “node” package and expects to run on the server. Glitch support suggested using browserify, which I will try, but I thought I’d check in here to see if anyone has any other insights into how to make this work.

Thanks in advance and kind regards,

Ted Stresen-Reuter

If you’re not willing to do server-side programming, browserify is definitely a good (and relatively easy) option. Just note that, on Glitch, you need your own web server running in order to install and use browserify (if in doubt, start with the hello-express template).

But if the CSV file is very large and you don’t need the whole data at once, I’d suggest to pre-process the CSV on the server side and let the client request the parts they need. I guess you can find some tutorials on the web.

1 Like

Thanks for the help, @Bubbler. I’m more than happy to do server-side programming but not sure how to do it on glitch. The glitch support sent me this link on how to use browserify in the context of glitch, so I’ll probably start with that.

The CSV is relatively light (less than 200 rows, only about 30 columns, less than 4Kb in total, IIRC) so I think it’s doable in JS only.

Just out of curiosity, can you do server-side work on glitch? (I know, it seems like I don’t even know what I’m doing but I promise, I’m almost there!)

hey @tedmasterweb – you definitely can do server-side work on glitch! Basically each project is its own container, and the only major limitations (which I see) are that you don’t have sudo privileges so there are a lot of defaults you can’t change. I think that the defaults are mostly set for a node.js backend, but with some fiddling you can also do python or php. If you remix this project (which @Bubbler mentioned above) it’s all set up for you! -->

I also found this for browserify but my money would be on hello-express being simpler! Good luck (and feel free to message me if you hit a snag!)

Thanks to both of you. I’ll give that a try. Really appreciate the help!