Skip to content

v0.6.0

Compare
Choose a tag to compare
@sejori sejori released this 02 Nov 23:07
· 16 commits to main since this release
181e82b

What's Changed

  • Usability rework by @sebringrose in #60
  • feat: added server.use method for adding global middleware by @sebringrose in #62
  • Update README.md by @sebringrose in #61

Summary

With this release I have tried to make Peko's API a bit more user friendly. The new server.addRoutes() method remove the need to loop arrays in index files. The new server.use() method provides a familiar way to add global middlware instead of the clunky config object.

Speaking of the config object, it's basically gone. I brought all logging into one logging function and removed the errorHandler in favour of more straightforward default logging that can be overwritten with middleware. Those changes made the config object so small that it was no longer needed!

Also, the custom Event type is gone. It was clunky and weird and ultimately not user-friendly as people had to learn this object pattern to use the emitter and understand event logging. Now emitters can emit anything and advanced event systems are left to the user to implement.

Full Changelog: v0.5.4...v0.6.0