nfroidure/ttf2woff2 : Convert ttf files to woff2.
▻https://github.com/nfroidure/ttf2woff2
Un convertisseur de polices TTF vers Woff2 en nodeJS
Alternativement un outil en ligne : ▻https://www.aconvert.com/fr/image/ttf-to-woff2
nfroidure/ttf2woff2 : Convert ttf files to woff2.
▻https://github.com/nfroidure/ttf2woff2
Un convertisseur de polices TTF vers Woff2 en nodeJS
Alternativement un outil en ligne : ▻https://www.aconvert.com/fr/image/ttf-to-woff2
Serving #react and Koa together
▻https://hackernoon.com/serving-react-and-koa-together-720ba6668298?source=rss----3a8144eabfe3--
Reactjs and #koajs are two great frameworks of #javascript. I wonder how to serve React and Koa projects in the same server and same port! Finally, I’ve reached a solution and today I’ll discuss it.In this article, we’ll create an API using koa and a React project (frontend) which will consume the API. The idea is very simple, React will fetch some book names from the backend (koa) and render them.Backend (Koa) projectKoa uses async functions, this gives an advantage over callback functions. By default, Koa does not come with any middlewares. That makes Koa very minimal and elegant.At first, we need to install node (koa requires node v7.6.0 or higher). Then install koa using : npm i koaCreate a project directory named “book” and run npm init -y.As koa doesn’t come with any middlewares and we need (...)
Getting started with Dockerizing your Node.js Application
▻https://hackernoon.com/getting-started-with-dockerizing-your-node-js-application-bab6b2451cde?s
Photo by chuttersnap on UnsplashThere has been a conscious move within SaaS companies towards microservice architectures. To facilitate that, we generally use #docker setups. Well, let us not skip steps and see why people recommend this.To better understand #containerization and Docker, let’ use the example of the actual thing it is modeled after, Shipping Containers.Why use Shipping Containers?Well, shipping containers revolutionized the transportation industry by standardizing and making it simple to transport large quantities of goods. This could be over sea or land. Now with these standard containers, we are able to ship multiple things in one container or even ship large quantities of a single thing in multiple containers. Some of the key features here are:Standardized: These shipping (...)
Semantic Versioning 101
▻https://hackernoon.com/semantic-versioning-101-d2623083714b?source=rss----3a8144eabfe3---4
Semantic Versioning 2.0.0 (semver.org) is a robust and elementary standard that encapsulates a wealth of information about the software you’re publishing or consuming.Open source veterans know and understand the importance of this standard. If you’ve run a project in long-term maintenance mode, you come to realize its power one way or another. Still, enthusiastic, fast-moving dev teams like to find ways around this standard. I’ve seen more than a few engineers decide to invent their own ideas around major, minor, and patch increments. Their rationale is rooted in aesthetics or their own release schedule.A key principleAside from the concise and complete information at semver.org, it is critical to understand:Semantic versioning is for your consumers. It’s not for your release schedule or (...)
#python #nodejs #open-source #software-development #javascript
Generating PDFs in #javascript for fun and profit!
▻https://hackernoon.com/generating-pdfs-in-javascript-for-fun-and-profit-c7af594cf697?source=rss
Up until recently, creating complex or elegant PDFs in Javascript has been challenging.Here I’m going to show you step-by-step the path of least resistance to beautiful PDFs. Spoiler: recently made possible by #docx to #pdf conversion in Javascript :-)What follows is some of what I will cover in my upcoming talk at PDF Association conference in Seattle in June.From 1000 feet, here are your three main alternatives:The first is to create the PDF directly, using pdfkit, jsPDF, or the higher level pdfmake. Pdfkit is like iText in the Java world. Pdfmake, based on pdfkit, has its own format for representing rich text; it converts this to PDF.The second is to create HTML, then convert that to PDF. These days probably using puppeteer.The third is to create a docx, then convert that to PDF.Put (...)
How to FaaS like a pro: 12 uncommon ways to invoke your #serverless functions on #aws [Part 1]
▻https://hackernoon.com/how-to-faas-like-a-pro-12-uncommon-ways-to-invoke-your-serverless-functi
Yes, this is you at the end of this article, contemplating new possibilities! [Photo by Joshua Earle on Unsplash]If you feel like skipping the brief introduction below, you can jump straight to the first four uncommon trigger with these shortlinks:Amazon Cognito User Pools — Users management & custom workflowsAWS Config — Event-driven configuration checksAmazon Kinesis Data Firehose — Data ingestion & validationAWS CloudFormation — IaC, Macros & custom transformsA bit of history firstWhen AWS Lambda became generally available on April 9th, 2015 it became the first Function-as-a-Service out there, and there were only a few ways you could trigger your functions besides direct invocation: Amazon S3, Amazon Kinesis, and Amazon SNS. Three months later we got Amazon API Gateway support, (...)
What is the future of JavaScript?
▻https://hackernoon.com/what-is-the-future-of-javascript-355b1f13b317?source=rss----3a8144eabfe3
source: sdtimesWhich programming language comes to your mind when you hear the word “software”? We are very sure that Javascript is among the top languages in your memory. Javascript is one of the well-known languages for every layperson.The chief reason behind its constant popularity is the vast usage. Do you know what percentage of developers are using this language? According to Stack Overflow, a popular website used by developers to share their skills, Javascript is used by 69.8%.It is followed by HTML, CSS, SQL, Java etc. Here is the representation of their findings:It is often remarked as a beginners’ language as it is quite easy to learn and execute. This makes it the best friend of developers! As a business person, you don’t have to go with what developers prefer.We want you to (...)
#reactjs-future #future-of-j #nodejs-future #javascript-future #angularjs-future
A Tale of Two (Docker Multi-Stage Build) Layers
▻https://hackernoon.com/a-tale-of-two-docker-multi-stage-build-layers-85348a409c84?source=rss---
Production Ready Dockerfiles for Node.js using SSR or NginxLicensed from Adobe Stock PhotosIn the last article of this series, we finished adding unit tests to our project to reach 100% code coverage. With tests in place, the next piece is getting our project ready for deployment.The last thing we need in place to get our application ready for #production deployment is a Dockerfile.The Dockerfile is also a great place to run our unit tests, which is why I’ve decided to write the tests first.We have a few goals with our build:It should be secureIt should be as slim as possibleIt should not build if quality standards are not metWith the goals in mind, let’s get started.Docker is essentially an isolated environment for your code to run in. Just like you would provision a server, you provision a (...)
#nginx #docker #kubernetes #nodejs
Deploying a Node.js #twitter Bot on AWS Lambda using #webpack
▻https://hackernoon.com/deploying-a-node-js-twitter-bot-on-aws-lambda-using-webpack-df6e2e187a78
I recently had an idea for a Twitter bot for the #LearnInPublic community, which I thought would be a fun project with half a day worth of work. Moreover, I wanted to use AWS Lambda function for the sake of learning. Why AWS Lambda? Because it’s practically free for maintaining a twitter bot and I got hands on experience with a seemingly complex tool used widely in the industry. You get 1,000,000 free requests and 400,000 seconds of compute time per month for AWS Lambda. My bot uses 0.02% of the above numbers.In the process I found a cool use-case Webpack. I had fun reading the webpack docs and figuring learning about the gotchas. Even though it was a very primitive use-case, felt like a true Sean Larkinn for a day. Here is a detailed article on how you could do the same.A little about (...)
12 #javascript Concepts That Will Level Up Your Development Skills
▻https://hackernoon.com/12-javascript-concepts-that-will-level-up-your-development-skills-b37d16
12 Concepts That Will Level Up Your JavaScript SkillsJavaScript is a complex language. If you’re a JavaScript developer at any level, it’s important to understand its foundational concepts. This article tackles 12 concepts that are critical for any JS developer to understand, but in no way represents the full breadth of what a JS developer should know.Note: If you enjoy this article, please give it a clap ? to help spread the word!I will be continuously updating this list in a Github repository called JS Tips & Tidbits. Please star ⭐ and share if you want to follow along!1. Value vs. Reference Variable AssignmentUnderstanding how JavaScript assigns to variables is foundational to writing bug-free JavaScript. If you don’t understand this, you could easily write code that unintentionally (...)
#software-development #front-end-development #programming #nodejs
How to install #node.js on #ubuntu 16.04/18.04 using #nvm (Node Version Manager)
▻https://hackernoon.com/how-to-install-node-js-on-ubuntu-16-04-18-04-using-nvm-node-version-mana
IntroductionNVM is basically the version manager for Node.js. With the help of NVM we can install and use multiple versions of Node.js along with #npm. If we have multiple Node.js projects having various versions of node and npm then always install node using NVM only.Installation of NVMFirst download the NVM installation script using cURL as follows$ curl -o- ▻https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bashAfter downloading the script, run the script using bash as follows$ bash install_nvm.shTo reflect the changes for the current user session, use following command$ source ~/.profileCheck installed NVM version as follows$ nvm —versionUse following nvm command to list all available node.js versions$ nvm ls-remoteIt shows the output as followsInstall particular node (...)
fnm: Fast and Simple Node.js Version Manager
▻https://hackernoon.com/fnm-fast-and-simple-node-js-version-manager-df82c37d4e87?source=rss----3
A super fast alternative to NVM is now open source on GitHubtl;dr: fnm is a very fast Node.js version manager, ~40x faster than NVM. It supports .nvmrc files and Fish shell out of the box. It works on Linux and Mac and distributed as a single executable - and it is open source on GitHub!So,Two weeks ago, I had opened a new tab on my terminal and complained in agony: “Oh dear god! Every time I open a new terminal it takes like one second!”. My teammates looked at me funny. “This is clearly sub-optimal and hurts my focus, and I believe it’s NVM’s fault.”I found it’s NVM that is at fault after I did a search around my .zshrc file, checking which line takes the most time. It was NVM’s initialization. I have been using NVM for years, and I always wanted to write a simple replacement, because my use (...)
JSON Web Tokens (JWT) Demystified
▻https://hackernoon.com/json-web-tokens-jwt-demystified-f7e202249640?source=rss----3a8144eabfe3-
JSON Web Token (JWT, often pronounced “jot”) is a powerful tool for confidently transmitting data between two parties through tokens. These parties can consist of users, servers, or any other combination of services. Based on an open standard (RFC-7519), JWTs are digitally signed with an encryption algorithm, so the receiving party can trust the information contained within. In computer #security this concept is known as Data Integrity.One main benefit of using a #jwt is that it’s very compact (assuming the issuer uses JWS Compact Serialization, which is recommended). They are generally small enough to be sent through a POST request, in an HTTP Header, or even as a query string within a URL. However, the more claims you add to a JWT, the more bloated it becomes. You could theoretically (...)
Publishing a #javascript Library Online: The Definitive Guide
▻https://hackernoon.com/publishing-a-javascript-library-online-the-definitive-guide-142547baa70d
Background by UnsplashThis is a continuation of my previous guide. Refer it to learn how to publish code to npmThis article focuses on publishing code for use in a browser.There will be 2 sections to this guide :Publishing browser-native code ?Converting an npm module for use in a browser ?For both cases, we will eventually deploy the code to npm to leverage the power of the free CDN unpkg1. Publishing browser-native code ?This one is easier. As the code is already in browser-usable format, it just needs to be included in the HTML code via the <script> tags.This will make its variables and functions available to the browser automatically.To publish it to a CDN :Use npm init -y to initialize a package.json for the repository.Publish it to npm via the steps given here : Steps to (...)
#nodejs #post-javascript-library #publish-javascript #javascript-library
Forward #fax to #email with #sendgrid and Node.js
▻https://hackernoon.com/forward-fax-to-email-with-sendgrid-and-node-js-6cdfa6f403c8?source=rss--
Forward Fax to Email with SendGrid and Node.jsIt’s 2019 and you need to receive a fax. What do you do? You could buy a fax machine, hook it up to a phone line and hand out your number. But it’s 2019 not 1979, we’re living in the future, so let’s grab Node.js, pick a couple of APIs and turn that fax into an email instead.You’re going to need a #twilio account, a SendGrid account and this noise to remind you what you’re missing out on as you build your very own fax-to-email converter.Receiving a faxRather than bulky machinery we’re going to use a Twilio number to receive our incoming faxes. You’re going to need a Twilio number that supports fax to build this app, so log in to your Twilio account. You can buy a new number or you may already have one, just look for this icon to show that it can (...)
#npx : #npm package runner
▻https://hackernoon.com/npx-npm-package-runner-7f6683e4304a?source=rss----3a8144eabfe3---4
An introduction to npx, the npm package runnernpm — package runnerWhat if you could interact with and run node modules without having them downloaded locally? What if you could directly run the code of your GitHub gits? Doesn’t sound possible? It actually is.In this article, we’ll talk about npx (package runner) — what is is, why we need it, and the use cases where the tool is helpful when running node packages from the command line.Backgroundnpm (node package manager) has improved a lot over the years and provides a way for developers to have a global and local installation of packages. There are times you are required to look over a package and try out commands, or you might even want to get rid of devDependencies. From npm@5.2.0, npm started installing a new binary alongside the usual npm (...)
Closures in #javascript learn the easy way
▻https://hackernoon.com/closures-in-javascript-learn-the-easy-way-7a7317ce2a07?source=rss----3a8
What are closures?A closure is an inner function that has access to the outer (enclosing) function’s variables — scope chain. The closure has three scope chains: it has access to its own scope (variables defined between its curly brackets), it has access to the outer function’s variables, and it has access to the global variablesIn simple words that is literally what it is, a function inside a function, that relies on variables in the outside function to work .The best way of understanding a concept is by doing it .so let’s have some examples on closures .function doSomeMath()var a=5;var b=4;var sum=a+b;return sum;var theResult = doSomeMath();console.log("The result:", theResult);We do some math here, set up three variables, and add one variable to the other, and return the sum. Now (...)
Enforcing Code Quality for Node.js
▻https://hackernoon.com/enforcing-code-quality-for-node-js-c3b837d7ae17?source=rss----3a8144eabf
Using Linting, Formatting, and Unit Testing with Code Coverage to Enforce Quality StandardsI Licensed from Adobe Stock PhotoIn my last article, I showed you how to use docker-compose to leverage standardized, already existing Dockerfiles for development. The next step in getting our application ready for deployment is productionizing it.I’m going to continue using the React/Parcel example from my earlier tutorial: Move over Next.js and Webpack!Here is the source code: ▻https://github.com/patrickleet/streaming-ssr-react-styled-componentsI also haven’t done anything else related to getting the application “production ready”, so I’ll also talk about what is required for that, though it may take another article to finish… we’ll see how it goes. I’m ad-libbing this.Let’s start with some quality (...)
#code-quality-nodejs #unit-testing #javascript #nodejs #code-coverage
Building isomorphic #javascript packages
▻https://hackernoon.com/building-isomorphic-javascript-packages-1ba1c7e558c5?source=rss----3a814
Building Isomorphic JavaScript PackagesI had to look up isomorphic in a dictionary the first time I came across this word in web development. Wikipedia reports that Isomorphic JavaScript, also known as Universal JavaScript, describes JavaScript applications which run both on the client and the server.Building a package that works out of the box in both the server (ie Node) and the client (ie a browser) is hard. As soon as you start mixing in dependencies, if even one of them makes a call to a node-only package (think fs) or browser-only object (think window) , it will tank your whole build. Worse yet, you may not even be able to reasonably infer this problem exists, as they may be buried in sub-sub-sub-dependencies that have no bearing on the code you are writing.This document describes (...)
#universal-javascript #nodejs #typescript #isomorphic-javascript
How to deploy a blog using Cosmic JS + Vuetify to #netlify
▻https://hackernoon.com/how-to-deploy-a-blog-using-cosmic-js-vuetify-to-netlify-a5d15dcf9759?sou
In this tutorial, I’m going to show you how to create a minimalistic but awesome single page app blog using Vue, Vuex, Vuetify, Cosmic JS and deploy it to Netlify. Let’s get started.TL;DRDemo LinkView Code on GithubNetlify Deploy “Button”FeaturesNetlify hosting (plus CDN, Prerendering, Minification, etc..)Moderated commenting system (Un-moderated by default)Social share buttonsSEO Meta tags with Vue-MetaIntegrated content management system via Cosmic JSNeeded improvementsStatic page content connected to Cosmic JSPost categories featureGravatar comment integrationBack/Forward buttons to trigger post viewPrerequisitesYou will be required to have Node JS and npm before starting. Make sure you already have them installed. If not you can find them here: ▻https://nodejs.orgAlso in order to deploy it you (...)
Build and Deploy an #api with Standard Library and Node.js in 6 Easy Steps
▻https://hackernoon.com/build-deploy-and-publish-an-api-using-code-xyz-and-node-js-in-6-steps-8a
APIs, the building blocks of software, run our world. They’re how software systems communicate with each other, and how we as people communicate with software. Knowing how to build an API is not only a crucial skill for a software developer, but a foundational part of general coding literacy — a skill that can help anyone in their career.In this tutorial, you’ll learn how to build an API directly from your web browser — no other tools required — using #code on Standard Library, the online API editor. Whether you’re new to software development or a veteran looking for faster ways to ship code, I’ll demonstrate how quickly you can build a working API with Code on Standard Library. We’ll use Code on Standard Library to build a fully functional SMS service that connects AscenDB’s Peaks API for (...)
Developer Spotlight: Quincy Larson of freeCodeCamp
▻https://hackernoon.com/developer-spotlight-quincy-larson-of-freecodecamp-f5806d9db35a?source=rs
The Cosmic Community focuses on providing helpful resources to equip developers and content creators with the inspiration and know-how to build apps faster, together. In this installment of the Cosmic JS Developer Spotlight Series, we sat down with Quincy Larson, the developer and famed teacher behind freeCodeCamp.org. Follow Quincy on Twitter and enjoy the Q/A.Cosmic JS: When and how did you first begin building software?Quincy: I first started building software when I was in my 30’s, working as a school director. I wanted to figure out how to automate some of the more tedious tasks for my teachers and staff, which lead to me learning some programming.I guess you could consider those early automation scripts to be my first pieces of software, even though they were super hacky and I was (...)
How to start a Node.js project
▻https://hackernoon.com/how-to-start-a-node-js-project-881d811bdcf4?source=rss----3a8144eabfe3--
Sometimes I write blog posts to remind myself what I’ve learned and sometimes I write them because someone else shares something and I want to remember that better. This post is one of the latter.Starting a Node.js projectUsually when I start a new Node.js project I use #npm to generate my initial project.npm initnpm then asks me some questions and builds a package.json file for me. Then I start building the project.Later I inevitably copy and paste a .gitignore file from GitHub’s useful repo of .gitignore templates. And if I remember I’ll actually create a LICENSE file with the open source license that I intended to use.This is not efficient.Then this week I saw Tierney Cyren tweet this:body[data-twttr-rendered="true"] background-color: transparent;.twitter-tweet margin: auto !important;How to (...)
A Better Way to Develop Node.js with #docker
▻https://hackernoon.com/a-better-way-to-develop-node-js-with-docker-cd29d3a0093?source=rss----3a
And Keep Your Hot Code ReloadingLicensed from Adobe Stock PhotoI’ve seen a lot of articles lately suggesting how to use Docker for development. I haven’t seen one yet that does it correctly.Obviously, correctly, is subjective, but I’d like to compare the typical wisdom, vs. how I usually approach the problem.The Conventional WisdomIn many tutorials, the first thing introduced is the Dockerfile.At the foundation of any Dockerized application, you will find a Dockerfile — ▻https://blog.codeship.com/using-docker-compose-for-nodejs-development/It apparently, is the foundation.The first several results on Google all suggest the first thing you need is a Dockerfile, as well.After all, how can you have a Docker environment without creating a Dockerfile?I’m here to tell that while this is true for (...)
#docker-compose #software-development #nodejs #nodejs-and-docker
My life as a Digital Nomad: a story about Cryptocurrencies, #javascript and Affiliate Marketing
▻https://hackernoon.com/my-life-as-a-digital-nomad-a-story-about-cryptocurrencies-javascript-and
My life as a Digital Nomad: A story about Cryptocurrencies, Javascript and Affiliate MarketingThis story is highly correlated with the #cryptocurrency bull market of 2017, when a tremendous amount of money was flowing towards the market. Building the exact same side project right now wouldn’t be so effective.But let’s start at the beginning, the story begins in may 2017, I had just left the company I was working for as a Node.js developer and was trying to build a project that would earn enough money to allow me to live as a digital nomad, like Pieter Levels or Adam@surfcoderepeat(Which Twitter feed I was reading every single day. I was obsessed with the digital nomad lifestyle back then).At this time, I was heavily involved with cryptocurrencies, and one day, as I’m trying to figure out (...)