pegasus.lua icon indicating copy to clipboard operation
pegasus.lua copied to clipboard

refactor(files) move serving files into a plugin

Open Tieske opened this issue 2 years ago • 5 comments

This builds on top of #127

  • moves file handling into a plugin
  • enforces HEAD requests to have no body

this reduces the 'handler' to primary task of running plugins

Tieske avatar Feb 28 '23 08:02 Tieske

I think we should add more unit tests here. We have entire new modules without any tests.

EvandroLG avatar May 05 '23 12:05 EvandroLG

Finally had some time to write the tests for the 2 new files; test for the json lib, and the files-plugin.

Tieske avatar Dec 27 '23 23:12 Tieske

@EvandroLG I rebased the PR, afetr some of the commits were merged via other PR's. What's left is hard to simplify due to conflicts that would arise.

Please have another look.

Tieske avatar Feb 29 '24 13:02 Tieske

@EvandroLG anything I can do to get this moving?

Tieske avatar Mar 27 '24 12:03 Tieske

Super nice stuff, @Tieske! Thanks! :) Can you update the Native Plugins section with an example of how to use the File plugin? We also need to update the rockspec and add the new plugin. Can you please do that?

EvandroLG avatar Mar 31 '24 09:03 EvandroLG

Added the requested docs. Accidentally also pushed the router plugin, but removed that commit again. The files plugin was already in the rockspec.

So all changed as requested.

Tieske avatar Apr 02 '24 18:04 Tieske

Looks great, @Tieske! Thanks!

EvandroLG avatar Apr 07 '24 08:04 EvandroLG