Tasklist altseven example app - updated v. 0.4.0

After a review of the AOP implementation with tiny-aop, I decided to remove tiny-aop in favor of using middleware with Express routes. In case you are not familiar with the pattern, you can define functions and call them in a pipeline fashion with Express.

const httpinterceptor = require( './interceptors/httpinterceptor.js' );

app.use( httpinterceptor.checkHTTPAuth );

// routes follow 

This implementation style is far cleaner than the AOP implementation, and is exactly what I was trying to achieve using AOP but could not because of not having access to the request object at this stage (prior to the routes) using tiny-aop.

The checkHTTPAuth method barely changes, it only requires calling next() when you want the request to continue to the next function - in this case the route handler.

Get the updated code here: