Home

Issue: 1849

Access the file system

[issue link]

In express.js I can write a controller that:

  1. accesses the file system
  2. reads the contents of a directory, and
  3. sends that information as a local variable to the view.

I’m not sure how to go about this in nuxt.js because I can’t require the fs module from the component. Is there anywhere where I can populate a variable with a list of files in the server (for example, in the static folder) so that the component has access to it?

This question is available on Nuxt.js community (#c1662)