Understanding Sequelize's 'escape' functionSo a disclaimer. As a software engineer, I'm not a security expert. I rely heavily on those who know better, especially OWASP. So all feedback is welcome to help fix any flaws in the article or improve it. Sequelize is a very robust database ORM for...Jan 5, 2025 · 7 min readgemmablack.dev
Node.js: using fs.watch to re-import CommonJS modules.Disclaimer. This is an investigation into what is possible. Not a fully-blown solution into how to reload modules without restarting the whole server. In a previous article, I was investigating how to use require.cache to refresh a module by deletin...Nov 17, 2024 · 3 min readgemmablack.dev
Node.js: refreshing a module using require.cacheThis is purely in reference to CommonJS modules. TLDR Before I bore you with why I did this, refreshing a module can be done by deleting its reference in the require.cache object. Like so: require('./some-module') // use module delete require.cach...Nov 17, 2024 · 5 min readgemmablack.dev
Laravel: Modularizing Little Pieces of Logic Through Local Composer Packages“Premature optimisation is the root of all evil”. But sometimes you know upfront that you can create a clean module, separate from the rest of the Laravel app. And I like Kelly Sutton’s mantra – optimize for deletability. Why? “By working with code,...Nov 10, 2024 · 2 min readgemmablack.dev
Sacrilege: Why I decided to use JSON in a relational database to manage visa checklists?So the consensus is that JSON in a relational database is bad. Now, while I’m not a database expert by no stretch of the imagination, I will just say that there’s nothing wrong about it if used in the right way. So my problem: modelling visa checklis...Sep 19, 2024 · 3 min readgemmablack.dev