servor icon indicating copy to clipboard operation
servor copied to clipboard

Serve from multiple roots

Open NemoStein opened this issue 2 years ago • 0 comments

This PR addresses the issue #74

It adds a new CLI argument --extern path (or --extern=path) that can be repeated to serve content from multiple roots.

$ cd ~/project-root
$ servor ./static --extern ./src --extern ./libs

It also adds the property extern of type string[] to the config object.

import servor from 'servor';

servor({
  /* ... */
  extern: [
    './src',
    './libs'
  ]
})

NemoStein avatar Sep 06 '21 18:09 NemoStein