How to read files?
Good evening,
How to properly read a file with the Nuxt server API having been added to my project before the build, where should I put the file? What is its path once built? Knowing that I definitely don't want it to be public.
Thanks in advance !
4 Replies
I found unstorage, but is there a way to do this with FS? Maybe by modifying the Nuxt config?
no, unstorage is the way to go π
It also has an FS driver!
Alexander Lichter
YouTube
Store files and K/Vs in Nuxt and Nitro - Powered by unstorage
πΎ Reading and writing information is important for an application, be it for storage, caching or more. But especially with all the available runtimes and platform (think serverless, edge, ...) and storage options, it became more and more complex. Luckily, useStorage, powered by the unstorage package, can help us there! Let's see how!
---
Key po...
Alexander Lichter
YouTube
Nitro and EJS combined?!
Some of you might be well aware of EJS, aka one of the most used templating engines in the NodeJS world, especially when using Express back in the days. But did you know that you can also make EJS work with Nitro? And even with unstorage π
Let's do it!
#nitro #ejs #javascript #webdevelopment
---
Links and Resources:
π 10% off for vuejs.de Co...