Readme

Cross-platform safe Last Login Middleware

This is a pretty ugly sittuation. It's really a hack around the way @stevekrouse/lastlogin was written, but to make it safe to import on the frontend, because it only imports the backend stuff dynamically per request.

1
2
3
4
export const lastlogin = (handler) => (async (req) => {
const { lastlogin } = await import("https://esm.town/v/stevekrouse/lastlogin");
return lastlogin(handler)(req);
})
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
September 17, 2024