#Sequelize #Express #javascript #nodeSequelize Data Types: a practical guideDataTypes are core to the Sequelize 4 library. This is a practical and complete guide to make up for the sparse Sequelize official documentation on the subject. First of all, DataTypes contains both the types and generators for default values: eg. NOW, UUIDV1 and UUIDV4 are speci ...
#javascript #web developmentAvoid null/undefined in JavaScript arraysHow to avoid TypeError: Cannot read property ___ of undefined using Array.filter(Boolean) tl;dr: Array.filter(Boolean) filters out falsy values (null, undefined, 0, false, '') and avoids Cannot read property of undefined errors. Table of contents: ...
#javascript #tipJavaScript array type check - “is array” vs object in-depthDetecting Array vs Object in JavaScript with examples tl;dr To detect if something is an Array in JavaScript, use Array.isArray(somethingObjectToCheck). This post is a quarter useful, quarter history lesson, half quirky JavaScript exploration. Table of contents: ...
#meta #seo #technical writingTechnical content workflow for “Code with Hugo”: static site, Paper, Medium, DEV and Buttondowntl;dr: here are the tools used to power, build and publish codewithhugo.com: Dropbox Paper because it syncs desktop/mobile and outputs to markdown Unsplash for cover images Edited Markdown + images → Hugo static site generator Casper 2 (https://ghost.org default theme) for Hugo S ...
#javascript #vuejs #nodePost Frequency: from prototype to production with Vue + NodeIf you want to ship, use the tools you know. — A lot of people Let’s apply that principle: I’m building Post Frequency/Accountable Blogging, I’m familiar with Vue and Node-based backends. Netlify makes frontend deployments trivial and I’ve settled on Dokku for ...
#javascript #meta #paymentAdd a Vanilla JavaScript paywall to a Hugo site using checkoutpage.coHow I created the buying mechanism for the Sequelize ES6 Cheatsheet using checkoutpage.co and sprinkles of vanilla JavaScript. This strictly isn’t a paywall, it’s all client-side and doesn’t check much. In principle you can display the whole things using a bit of CSS ...
#node #javascript #meta #gitA simple JavaScript/Node coding setup on Mac OS XHere’s how I get productive for JavaScript/Node on Mac OS. It includes iTerm2, zsh, Node, Visual Studio Code and some git commands. ...
#node #sequelize #git #cli #javascriptProgress and roadblocks: a journey into open-sourceEnhancing generators for ES6 in the Sequelize CLI This is the story of my discovery of ES6-class style model definitions with Sequelize (see Using ES6 classes for Sequelize 4 models). The realisation that the current Sequelize CLI model generator didn’t support it (as is e ...
#deployment #netlify #meta #javascriptA tiny case study about migrating to Netlify when disaster strikes at GitHub, featuring CloudflareLast Monday (22 October 2018) GitHub was going 💥, and scheduled content on Code with Hugo wasn’t going live. For context, the blog’s setup is documented in “Switching the lights on: Hugo vs Hugo config files”. tl;dr (as is relevant to this post) Cloudflare DNS + CDN + proxying + ...
#micro #node #javascript #es6 #architectureSimple, but not too simple: how using Zeit’s `micro` improves your Node applicationsLeave the Express comfort zone to expand how you think about Node application architecture. tl;dr using a function composition model for building HTTP servers is awesome Functions as a Service are great but have some drawbacks micro has a similar, simple API to FaaS but doesn&rs ...