#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 #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 ...
#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 ...
#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 ...
#node #javascript #es6Use ES modules/ES6 import in Node without Babel/Webpack using `esm`Node has been implementing more and more ES6+ (ESNext) features natively. One of the features that is taking the longest to implement is modules. The reason for this is that Node and npm run on what is called CommonJS, with which you use require('module-name') to import from othe ...
#node #jest #testing #javascript #SequelizeMocking/stubbing ES6 classes in tests with examples of Sequelize model unit testsThis post goes through some patterns that can be used to unit test ES6 classes. The examples will use Jest module auto-mocking but should be portable to other module mocking libraries (eg. Proxyquire) with some modifications. In “Using ES6 classes for Sequelize 4 models&rdq ...
#node #javascript #es6Why you should wrap your (JavaScript) dependenciesAn email sending example. ...
#javascript #node #graphql #web developmentJavaScript GraphQL client requests in Node and the browser using `graphql.js`An example consuming a GraphQL API in JavaScript from Node and the browser using graphql.js See the example live: https://example.codewithhugo.com/js-graphql-client-example/. Full repo: https://github.com/HugoDF/js-graphql-client-example. ...
#node #deployment #javascript #toolingBuild and deploy a Vue/React/Vanilla JS app with Parcel and GitHub pagesParcel allows us to bundle frontend applications with no configuration and GitHub pages affords us a way to deploy them for free. Here’s how to use these two tools together to deploy a JavaScript application. Full example of a repo deployed like this: https://github.com/Hug ...