<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by RisingStack on Medium]]></title>
        <description><![CDATA[Stories by RisingStack on Medium]]></description>
        <link>https://medium.com/@RisingStack?source=rss-558809ba0720------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gddLm92Fzj_1e6yQHmgVtQ.png</url>
            <title>Stories by RisingStack on Medium</title>
            <link>https://medium.com/@RisingStack?source=rss-558809ba0720------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 16:23:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@RisingStack/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Mastering Async Await in Node.js]]></title>
            <link>https://medium.com/the-node-js-collection/mastering-async-await-in-node-js-448a0983e1a2?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/448a0983e1a2</guid>
            <category><![CDATA[asyncawait]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Mon, 17 Feb 2020 11:00:00 GMT</pubDate>
            <atom:updated>2020-03-30T13:57:50.563Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>In this article, you will learn how you can simplify your callback or Promise based Node.js application with async functions (async/await).</strong></p><p>Whether you’ve looked at async/await and promises in javascript before, but haven’t quite mastered them yet, or just need a refresher, this article aims to help you.</p><blockquote>A note from the authors:</blockquote><blockquote>We re-released our number one article on the blog called “Mastering Async Await in Node.js” which has been read by more than 400.000 developers in the past 3 years.</blockquote><blockquote>This staggering 2000 word essay is usually the Nr. 1 result when you Google for Node.js Async/Await info, and for a good reason.</blockquote><blockquote>It’s full of real-life use cases, code examples, and deep-diving explanations on how to get the most out of async/await. Since it’s a re-release, we fully updated it with new code examples, as there are a lot of new Node.js features since the original release which you can take advantage of.</blockquote><h3>What are async functions in Node?</h3><p>Async functions are available natively in Node and are denoted by the async keyword in their declaration. They always return a promise, even if you don’t explicitly write them to do so. Also, the await keyword is only available inside async functions at the moment - it cannot be used in the global scope.</p><p>In an async function, you can await any Promise or catch its rejection cause.</p><p>So if you had some logic implemented with promises:</p><pre>function handler (req, res) {<br>  return request(&#39;https://user-handler-service&#39;)<br>    .catch((err) =&gt; {<br>      logger.error(&#39;Http error&#39;, err);<br>      error.logged = true;<br>      throw err;<br>    })<br>    .then((response) =&gt; Mongo.findOne({ user: response.body.user }))<br>    .catch((err) =&gt; {<br>      !error.logged &amp;&amp; logger.error(&#39;Mongo error&#39;, err);<br>      error.logged = true;<br>      throw err;<br>    })<br>    .then((document) =&gt; executeLogic(req, res, document))<br>    .catch((err) =&gt; {<br>      !error.logged &amp;&amp; console.error(err);<br>      res.status(500).send();<br>    });<br>}</pre><p>You can make it look like synchronous code using async/await:</p><pre>async function handler (req, res) {<br>  let response;<br>  try {<br>    response = await request(&#39;https://user-handler-service&#39;)  ;<br>  } catch (err) {<br>    logger.error(&#39;Http error&#39;, err);<br>    return res.status(500).send();<br>  }</pre><pre>  let document;<br>  try {<br>    document = await Mongo.findOne({ user: response.body.user });<br>  } catch (err) {<br>    logger.error(&#39;Mongo error&#39;, err);<br>    return res.status(500).send();<br>  }</pre><pre>  executeLogic(document, req, res);<br>}</pre><p>Currently in Node you get a warning about unhandled promise rejections, so you don’t necessarily need to bother with creating a listener. However, it is recommended to crash your app in this case as when you don’t handle an error, your app is in an unknown state. This can be done either by using the --unhandled-rejections=strict CLI flag, or by implementing something like this:</p><pre>process.on(&#39;unhandledRejection&#39;, (err) =&gt; { <br>  console.error(err);<br>  process.exit(1);<br>})</pre><p>Automatic process exit will be added in a future Node release — preparing your code ahead of time for this is not a lot of effort, but will mean that you don’t have to worry about it when you next wish to update versions.</p><h3>Patterns with async functions</h3><p>There are quite a couple of use cases when the ability to handle asynchronous operations as if they were synchronous comes very handy, as solving them with Promises or callbacks requires the use of complex patterns.</p><p>Since node@10.0.0, there is support for async iterators and the related for-await-of loop. These come in handy when the actual values we iterate over, and the end state of the iteration, are not known by the time the iterator method returns — mostly when working with streams. Aside from streams, there are not a lot of constructs that have the async iterator implemented natively, so we’ll cover them in another post.</p><h3>Retry with exponential backoff</h3><p>Implementing retry logic was pretty clumsy with Promises:</p><pre>function request(url) {<br>  return new Promise((resolve, reject) =&gt; {<br>    setTimeout(() =&gt; {<br>      reject(`Network error when trying to reach ${url}`);<br>    }, 500);<br>  });<br>}</pre><pre>function requestWithRetry(url, retryCount, currentTries = 1) {<br>  return new Promise((resolve, reject) =&gt; {<br>    if (currentTries &lt;= retryCount) {<br>      const timeout = (Math.pow(2, currentTries) - 1) * 100;<br>      request(url)<br>        .then(resolve)<br>        .catch((error) =&gt; {<br>          setTimeout(() =&gt; {<br>            console.log(&#39;Error: &#39;, error);<br>            console.log(`Waiting ${timeout} ms`);<br>            requestWithRetry(url, retryCount, currentTries + 1);<br>          }, timeout);<br>        });<br>    } else {<br>      console.log(&#39;No retries left, giving up.&#39;);<br>      reject(&#39;No retries left, giving up.&#39;);<br>    }<br>  });<br>}</pre><pre>requestWithRetry(&#39;http://localhost:3000&#39;)<br>  .then((res) =&gt; {<br>    console.log(res)<br>  })<br>  .catch(err =&gt; {<br>    console.error(err)<br>  });</pre><p>This would get the job done, but we can rewrite it with async/await and make it a lot more simple.</p><pre>function wait (timeout) {<br>  return new Promise((resolve) =&gt; {<br>    setTimeout(() =&gt; {<br>      resolve()<br>    }, timeout);<br>  });<br>}</pre><pre>async function requestWithRetry (url) {<br>  const MAX_RETRIES = 10;<br>  for (let i = 0; i &lt;= MAX_RETRIES; i++) {<br>    try {<br>      return await request(url);<br>    } catch (err) {<br>      const timeout = Math.pow(2, i);<br>      console.log(&#39;Waiting&#39;, timeout, &#39;ms&#39;);<br>      await wait(timeout);<br>      console.log(&#39;Retrying&#39;, err.message, i);<br>    }<br>  }<br>}</pre><p>A lot more pleasing to the eye isn’t it?</p><h3>Intermediate values</h3><p>Not as hideous as the previous example, but if you have a case where 3 asynchronous functions depend on each other the following way, then you have to choose from several ugly solutions.</p><blockquote>functionA returns a Promise, then functionB needs that value and functionC needs the resolved value of both functionA&#39;s and functionB&#39;s Promise.</blockquote><h4>Solution 1: The .then Christmas tree</h4><pre>function executeAsyncTask () {<br>  return functionA()<br>    .then((valueA) =&gt; {<br>      return functionB(valueA)<br>        .then((valueB) =&gt; {          <br>          return functionC(valueA, valueB)<br>        })<br>    })<br>}</pre><p>With this solution, we get valueA from the surrounding closure of the 3rd then and valueB as the value the previous Promise resolves to. We cannot flatten out the Christmas tree as we would lose the closure and valueA would be unavailable for functionC.</p><h4>Solution 2: Moving to a higher scope</h4><pre>function executeAsyncTask () {<br>  let valueA<br>  return functionA()<br>    .then((v) =&gt; {<br>      valueA = v<br>      return functionB(valueA)<br>    })<br>    .then((valueB) =&gt; {<br>      return functionC(valueA, valueB)<br>    })<br>}</pre><p>In the Christmas tree, we used a higher scope to make valueA available as well. This case works similarly, but now we created the variable valueA outside the scope of the .then-s, so we can assign the value of the first resolved Promise to it.</p><p>This one definitely works, flattens the .then chain and is semantically correct. However, it also opens up ways for new bugs in case the variable name valueA is used elsewhere in the function. We also need to use two names — valueA and v — for the same value.</p><blockquote>Are you looking for help with enterprise-grade Node.js Development?<br><a href="https://risingstack.com/nodejs-development-consulting-services">Hire the Node developers of RisingStack</a>!</blockquote><h4>Solution 3: The unnecessary array</h4><pre>function executeAsyncTask () {<br>  return functionA()<br>    .then(valueA =&gt; {<br>      return Promise.all([valueA, functionB(valueA)])<br>    })<br>    .then(([valueA, valueB]) =&gt; {<br>      return functionC(valueA, valueB)<br>    })<br>}</pre><p>There is no other reason for valueA to be passed on in an array together with the Promise functionB then to be able to flatten the tree. They might be of completely different types, so there is a high probability of them not belonging to an array at all.</p><h4>Solution 4: Write a helper function</h4><pre>const converge = (...promises) =&gt; (...args) =&gt; {<br>  let [head, ...tail] = promises<br>  if (tail.length) {<br>    return head(...args)<br>      .then((value) =&gt; converge(...tail)(...args.concat([value])))<br>  } else {<br>    return head(...args)<br>  }<br>}</pre><pre>functionA(2)<br>  .then((valueA) =&gt; converge(functionB, functionC)(valueA))</pre><p>You can, of course, write a helper function to hide away the context juggling, but it is quite difficult to read, and may not be straightforward to understand for those who are not well versed in functional magic.</p><h4>By using async/await our problems are magically gone:</h4><pre>async function executeAsyncTask () {<br>  const valueA = await functionA();<br>  const valueB = await functionB(valueA);<br>  return function3(valueA, valueB);<br>}</pre><h3>Multiple parallel requests with async/await</h3><p>This is similar to the previous one. In case you want to execute several asynchronous tasks at once and then use their values at different places, you can do it easily with async/await:</p><pre>async function executeParallelAsyncTasks () {<br>  const [ valueA, valueB, valueC ] = await Promise.all([ functionA(), functionB(), functionC() ]);<br>  doSomethingWith(valueA);<br>  doSomethingElseWith(valueB);<br>  doAnotherThingWith(valueC);<br>}</pre><p>As we’ve seen in the previous example, we would either need to move these values into a higher scope or create a non-semantic array to pass these values on.</p><h3>Array iteration methods</h3><p>You can use map, filter and reduce with async functions, although they behave pretty unintuitively. Try guessing what the following scripts will print to the console:</p><p><em>1. map</em></p><pre>function asyncThing (value) {<br>  return new Promise((resolve) =&gt; {<br>    setTimeout(() =&gt; resolve(value), 100);<br>  });<br>}</pre><pre>async function main () {<br>  return [1,2,3,4].map(async (value) =&gt; {<br>    const v = await asyncThing(value);<br>    return v * 2;<br>  });<br>}</pre><pre>main()<br>  .then(v =&gt; console.log(v))<br>  .catch(err =&gt; console.error(err));</pre><p><em>2. filter</em></p><pre>function asyncThing (value) {<br>  return new Promise((resolve) =&gt; {<br>    setTimeout(() =&gt; resolve(value), 100);<br>  });<br>}</pre><pre>async function main () {<br>  return [1,2,3,4].filter(async (value) =&gt; {<br>    const v = await asyncThing(value);<br>    return v % 2 === 0;<br>  });<br>}</pre><pre>main()<br>  .then(v =&gt; console.log(v))<br>  .catch(err =&gt; console.error(err));</pre><p><em>3. reduce</em></p><pre>function asyncThing (value) {<br>  return new Promise((resolve) =&gt; {<br>    setTimeout(() =&gt; resolve(value), 100);<br>  });<br>}</pre><pre>async function main () {<br>  return [1,2,3,4].reduce(async (acc, value) =&gt; {<br>    return await acc + await asyncThing(value);<br>  }, Promise.resolve(0));<br>}</pre><pre>main()<br>  .then(v =&gt; console.log(v))<br>  .catch(err =&gt; console.error(err));</pre><p>Solutions:</p><ol><li>[ Promise { &lt;pending&gt; }, Promise { &lt;pending&gt; }, Promise { &lt;pending&gt; }, Promise { &lt;pending&gt; } ]</li><li>[ 1, 2, 3, 4 ]</li><li>10</li></ol><p>If you log the returned values of the iteratee with map you will see the array we expect: [ 2, 4, 6, 8 ]. The only problem is that each value is wrapped in a Promise by the AsyncFunction.</p><p>So if you want to get your values, you’ll need to unwrap them by passing the returned array to a Promise.all:</p><pre>main()<br>  .then(v =&gt; Promise.all(v))<br>  .then(v =&gt; console.log(v))<br>  .catch(err =&gt; console.error(err));</pre><p>Originally, you would first wait for all your promises to resolve and then map over the values:</p><pre>function main () {<br>  return Promise.all([1,2,3,4].map((value) =&gt; asyncThing(value)));<br>}</pre><pre>main()<br>  .then(values =&gt; values.map((value) =&gt; value * 2))<br>  .then(v =&gt; console.log(v))<br>  .catch(err =&gt; console.error(err));</pre><p><strong>This seems a bit more simple, doesn’t it?</strong></p><p>The async/await version can still be useful if you have some long running synchronous logic in your iteratee and another long-running async task.</p><p>This way you can start calculating as soon as you have the first value — you don’t have to wait for all the Promises to be resolved to run your computations. Even though the results will still be wrapped in Promises, those are resolved a lot faster then if you did it the sequential way.</p><p><strong>What about </strong><strong>filter? Something is clearly wrong...</strong></p><p>Well, you guessed it: even though the returned values are [ false, true, false, true ], they will be wrapped in promises, which are truthy, so you&#39;ll get back all the values from the original array. Unfortunately, all you can do to fix this is to resolve all the values and then filter them.</p><p><strong>Reducing</strong> is pretty straightforward. Bear in mind though that you need to wrap the initial value into Promise.resolve, as the returned accumulator will be wrapped as well and has to be await-ed.</p><p>.. As it is pretty clearly intended to be used for imperative code styles.</p><p>To make your .then chains more &quot;pure&quot; looking, you can use Ramda&#39;s <a href="http://ramdajs.com/0.17/docs/#pipeP">pipeP</a> and <a href="http://ramdajs.com/0.17/docs/#composeP">composeP</a> functions.</p><h3>Rewriting callback-based Node.js applications</h3><p>Async functions return a Promise by default, so you can rewrite any callback based function to use Promises, then await their resolution. You can use the <a href="http://2ality.com/2017/05/util-promisify.html">util.promisify</a> function in Node.js to turn callback-based functions to return a Promise-based ones.</p><h3>Rewriting Promise-based applications</h3><p>Simple .then chains can be upgraded in a pretty straightforward way, so you can move to using async/await right away.</p><pre>function asyncTask () {<br>  return functionA()<br>    .then((valueA) =&gt; functionB(valueA))<br>    .then((valueB) =&gt; functionC(valueB))<br>    .then((valueC) =&gt; functionD(valueC))<br>    .catch((err) =&gt; logger.error(err))<br>}</pre><p>will turn into</p><pre>async function asyncTask () {<br>  try {<br>    const valueA = await functionA();<br>    const valueB = await functionB(valueA);<br>    const valueC = await functionC(valueB);<br>    return await functionD(valueC);<br>  } catch (err) {<br>    logger.error(err);<br>  }<br>}</pre><h3>Rewriting Node.js apps with async/await</h3><ul><li>If you liked the good old concepts of if-else conditionals and for/while loops,</li><li>if you believe that a try-catch block is the way errors are meant to be handled,</li></ul><p>you will have a great time rewriting your services using async/await.</p><p>As we have seen, it can make several patterns a lot easier to code and read, so it is definitely more suitable in several cases than Promise.then() chains. However, if you are caught up in the functional programming craze of the past years, you might wanna pass on this language feature.</p><p>Are you already using async/await in production, or you plan on never touching it? Let&#39;s discuss it in the comments below.</p><blockquote>Are you looking for help with enterprise-grade Node.js Development?<br><a href="https://risingstack.com/nodejs-development-consulting-services">Hire the Node developers of RisingStack</a>!</blockquote><p><em>This article was originally written by Tamas Kadlecsik and was released on 2017 July 5. The heavily revised second edition was authored by Janos Kubisch and Tamas Kadlecsik, and it was released on 2020 February 17.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ge02UoA45zdKb9GeY4oWvA.png" /></figure><p><em>Originally published at </em><a href="https://blog.risingstack.com/mastering-async-await-in-nodejs/"><em>https://blog.risingstack.com</em></a><em> on February 17, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=448a0983e1a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/mastering-async-await-in-node-js-448a0983e1a2">Mastering Async Await in Node.js</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node.js Async Best Practices & Avoiding Callback Hell | @RisingStack]]></title>
            <link>https://medium.com/the-node-js-collection/node-js-async-best-practices-avoiding-callback-hell-risingstack-cae115b85572?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/cae115b85572</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[async]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Mon, 10 Feb 2020 09:50:00 GMT</pubDate>
            <atom:updated>2020-02-18T13:38:53.500Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, we cover what tools and techniques you have at your disposal when handling Node.js asynchronous operations: async.js, promises, and async functions.</p><p>After reading this article, you’ll know how to use the latest async tools at your disposal provided by Node.js!</p><blockquote>Node.js at Scale is a collection of articles focusing on the needs of companies with bigger Node.js installations and advanced Node developers. Chapters:</blockquote><blockquote>.</blockquote><blockquote><strong>Using npm:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/nodejs-at-scale-npm-best-practices/">npm Tricks and Best Practices</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/nodejs-at-scale-npm-publish-tutorial/">SemVer and Module Publishing</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/node-js-at-scale-module-system-commonjs-require/">Understanding the Module System, CommonJS and require</a></blockquote><blockquote>.</blockquote><blockquote><strong>Node.js Internals Deep Dive:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/">The Node.js Event Loop</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/node-js-at-scale-node-js-garbage-collection/">Node.js Garbage Collection Explained</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/writing-native-node-js-modules/">Writing Native Node.js Modules</a></blockquote><blockquote>.</blockquote><blockquote><strong>Building with Node.js:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/node-js-project-structure-tutorial-node-js-at-scale/">Advanced Node.js Project Structuring</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/javascript-clean-coding-best-practices-node-js-at-scale/">JavaScript Clean Coding Best Practices</a></blockquote><blockquote>* Node.js Async Best Practices <em>[ this article ]</em></blockquote><blockquote>* <a href="https://blog.risingstack.com/event-sourcing-with-examples-node-js-at-scale/">Event sourcing with Examples</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/cqrs-explained-node-js-at-scale/">CQRS (Command Query Responsibility Segregation) Explained</a></blockquote><blockquote>.</blockquote><blockquote><strong>Testing + Node:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/getting-node-js-testing-and-tdd-right-node-js-at-scale/">Node.js Testing and Getting TDD Right</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/end-to-end-testing-with-nightwatch-js-node-js-at-scale/">Node.js End-to-End Testing with Nightwatch.js</a></blockquote><blockquote>.</blockquote><blockquote><strong>Node.js in Production:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/monitoring-nodejs-applications-nodejs-at-scale/">The Definitive Guide for Monitoring Node.js Applications</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/how-to-debug-nodej-js-with-the-best-tools-available/">How to Debug Node.js with the Best Tools Available</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/post-mortem-diagnostics-debugging-node-js-at-scale/">Node.js Post-Mortem Diagnostics &amp; Debugging</a></blockquote><blockquote>.</blockquote><blockquote><strong>Node.js + Microservices:</strong></blockquote><blockquote>* <a href="https://blog.risingstack.com/distributed-tracing-opentracing-node-js/">Distributed Tracing</a></blockquote><blockquote>* <a href="https://blog.risingstack.com/building-an-api-gateway-using-nodejs/">API Gateways</a></blockquote><h3>Asynchronous programming in Node.js</h3><p>Previously we have gathered a strong knowledge about <a href="https://blog.risingstack.com/node-hero-async-programming-in-node-js/">asynchronous programming in JavaScript</a> and understood how the <a href="https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/">Node.js event loop</a> works.</p><p>If you have not read these articles, I highly recommend them as introductions!</p><h3>The Problem with Node.js Async</h3><p>Node.js itself is single-threaded, but some tasks can run in parallel thanks to its asynchronous nature.</p><p>But what does running in parallel mean in practice?</p><p>Since we program a single-threaded VM, it is essential that we do not block execution by waiting for I/O, but handle operations concurrently with the help of Node.js’s event-driven APIs.</p><p>Let’s take a look at some fundamental patterns, and learn how we can write resource-efficient, non-blocking code, with the built-in solutions of Node.js.</p><h3>The Classical Approach — Callbacks</h3><p>Let’s take a look at these simple async operations. They do nothing special, just fire a timer and call a function once the timer finished.</p><pre>function fastFunction (done) {<br>  setTimeout(function () {<br>    done()<br>  }, 100)<br>}</pre><pre>function slowFunction (done) {<br>  setTimeout(function () {<br>    done()<br>  }, 300)<br>}</pre><p>Seems easy, right?</p><p>Our higher-order functions can be executed sequentially or in parallel with the basic “pattern” by nesting callbacks — but using this method can lead to an untameable callback-hell.</p><pre>function runSequentially (callback) {<br>  fastFunction((err, data) =&gt; {<br>    if (err) return callback(err)<br>    console.log(data)   <em>// results of a</em><br>  <br>    slowFunction((err, data) =&gt; {<br>      if (err) return callback(err)<br>      console.log(data) <em>// results of b</em><br>  <br>      <em>// here you can continue running more tasks</em><br>    })<br>  })<br>}</pre><p><a href="https://twitter.com/share?text=Never%20use%20the%20nested%20callback%20approach%20for%20handling%20asynchronous%20%23nodejs%20operations!%22%20via%20%40RisingStack;url=https://blog.risingstack.com/node-js-async-best-practices-avoiding-callback-hell-node-js-at-scale/">Never use the nested callback approach for handling asynchronous #nodejs operations!” via @RisingStack</a></p><h3>Avoiding Callback Hell with Control Flow Managers</h3><blockquote>To become an efficient Node.js developer, you have to avoid the constantly growing indentation level, produce clean and readable code and be able to handle complex flows.</blockquote><p>Let me show you some of the tools we can use to organize our code in a nice and maintainable way!</p><h3>#1: Using Promises</h3><p>There have been native promises in javascript since 2014, receiving an important boost in performance in Node.js 8. We will make use of them in our functions to make them non-blocking — without the traditional callbacks. The following example will call the modified version of both our previous functions in such a manner:</p><pre>function fastFunction () {<br>  return new Promise((resolve, reject) =&gt; {<br>    setTimeout(function () {<br>      console.log(&#39;Fast function done&#39;)<br>      resolve()<br>    }, 100)<br>  })<br>}</pre><pre>function slowFunction () {<br>  return new Promise((resolve, reject) =&gt; {<br>    setTimeout(function () {<br>      console.log(&#39;Slow function done&#39;)<br>      resolve()<br>    }, 300)<br>  })<br>}</pre><pre>function asyncRunner () {<br>    return Promise.all([slowFunction(), fastFunction()])<br>}</pre><p>Please note that Promise.all will fail as soon as any of the promises inside it fails.</p><p>The previous functions have been modified slightly to return promises. Our new function, asyncRunner, will also return a promise, that will resolve when all the contained functions resolve, and this also means that wherever we call our asyncRunner, we’ll be able to use the .then and .catch methods to deal with the possible outcomes:</p><pre>asyncRunner()<br>  .then(([ slowResult, fastResult ]) =&gt; {<br>    console.log(&#39;All operations resolved successfully&#39;)<br>  })<br>  .catch((error) =&gt; {<br>    console.error(&#39;There has been an error:&#39;, error)<br>  })</pre><p>Since node@12.9.0, there is a method called promise.allSettled, that we can use to get the result of all the passed in promises regardless of rejections. Much like Promise.all, this function expects an array of promises, and returns an array of objects that has a status of “fulfilled” or “rejected”, and either the resolved value or the error that occurred.</p><pre>function failingFunction() {<br>  return new Promise((resolve, reject) =&gt; {<br>    reject(new Error(&#39;This operation will surely fail!&#39;))<br>  })<br>}</pre><pre>function asyncMixedRunner () {<br>    return Promise.allSettled([slowFunction(), failingFunction()])<br>}</pre><pre>asyncMixedRunner()<br>    .then(([slowResult, failedResult]) =&gt; {<br>        console.log(slowResult, failedResult)<br>    })</pre><p>In previous node versions, where .allSettled is not available, we can implement our own version in just a few lines:</p><pre>function homebrewAllSettled(promises) {<br>  return Promise.all(promises.map((promise) =&gt; {<br>    return promise<br>      .then((value) =&gt; {<br>        return { status: &#39;fulfilled&#39;, value }<br>      })<br>      .catch((error) =&gt; {<br>        return { status: &#39;rejected&#39;, error }<br>      })<br>  }))<br>}</pre><h3>Serial task execution</h3><p>To make sure your tasks run in a specific order — maybe successive functions need the return value of previous ones, or depend on the run of previous functions less directly — which is basically the same as <a href="https://lodash.com/docs/#flow">_.flow</a> for functions that return a Promise. As long as it&#39;s missing from everyone&#39;s favorite utility library, you can easily create a chain from an array of your async functions:</p><pre>function serial(asyncFunctions) {<br>    return asyncFunctions.reduce(function(functionChain, nextFunction) {<br>        return functionChain.then(<br>            (previousResult) =&gt; nextFunction(previousResult)<br>        );<br>    }, Promise.resolve());<br>}</pre><pre>serial([parameterValidation, dbQuery, serviceCall ])<br>   .then((result) =&gt; console.log(`Operation result: ${result}`))<br>   .catch((error) =&gt; console.log(`There has been an error: ${error}`))</pre><p>In case of a failure, this will skip all the remaining promises, and go straight to the error handling branch. You can tweak it some more in case you need the result of all of the promises regardless if they resolved or rejected.</p><pre>function serial(asyncFunctions) {<br>    return asyncFunctions.map(function(functionChain, nextFunction) {<br>        return functionChain<br>            .then((previousResult) =&gt; nextFunction(previousResult))<br>            .then(result =&gt; ({ status: &#39;fulfilled&#39;, result }))<br>            .catch(error =&gt; ({ status: &#39;rejected&#39;, error }));<br>    }, Promise.resolve());<br>}</pre><h3>Converting callback functions to promises</h3><p>Node also provides a handy utility function called “promisify”, that you can use to convert any old function expecting a callback that you just have to use into one that returns a promise. All you need to do is import it in your project:</p><pre>const promisify = require(&#39;util&#39;).promisify;<br>function slowCallbackFunction (done) {<br>  setTimeout(function () {<br>    done()<br>  }, 300)<br>}<br>const slowPromise = promisify(slowCallbackFunction);</pre><pre>slowPromise()<br>  .then(() =&gt; {<br>    console.log(&#39;Slow function resolved&#39;)<br>  })<br>  .catch((error) =&gt; {<br>    console.error(&#39;There has been an error:&#39;, error)<br>  })</pre><p>It’s actually not that hard to implement a promisify function of our own, to learn more about how it works. We can even handle additional arguments that our wrapped functions might need!</p><pre>function homebrewPromisify(originalFunction, originalArgs = []) {<br>  return new Promise((resolve, reject) =&gt; {<br>    originalFunction(...originalArgs, (error, result) =&gt; {<br>      if (error) return reject(error)<br>      return resolve(result)<br>    })<br>  })<br>}</pre><p>We just wrap the original callback-based function in a promise, and then reject or resolve based on the result of the operation.</p><p>Easy as that!</p><p>For better support of callback based code — legacy code, ~50% of the npm modules — Node also includes a callbackify function, essentially the opposite of promisify, which takes an async function that returns a promise, and returns a function that expects a callback as its single argument.</p><pre>const callbackify = require(&#39;util&#39;).callbackify<br>const callbackSlow = callbackify(slowFunction)</pre><pre>callbackSlow((error, result) =&gt; {<br>  if (error) return console.log(&#39;Callback function received an error&#39;)<br>  return console.log(&#39;Callback resolved without errors&#39;)<br>})</pre><h3>#2: Meet Async — aka how to write async code in 2020</h3><p>We can use another javascript feature since node@7.6 to achieve the same thing: the async and await keywords. They allow you to structure your code in a way that is almost synchronous looking, saving us the .then chaining as well as callbacks:</p><pre>const promisify = require(&#39;util&#39;).promisify;</pre><pre>async function asyncRunner () {<br>    try {<br>      const slowResult = await promisify(slowFunction)()<br>      const fastResult = await promisify(fastFunction)()<br>      console.log(&#39;all done&#39;)<br>      return [<br>        slowResult,<br>        fastResult<br>      ]<br>    } catch (error) {<br>      console.error(error)<br>    }<br>}</pre><p>This is the same async runner we’ve created before, but it does not require us to wrap our code in .then calls to gain access to the results. For handling errors, we have the option to use try &amp; catch blocks, as presented above, or use the same .catch calls that we&#39;ve seen previously with promises. This is possible because async-await is an abstraction on top of promises - async functions always return a promise, even if you don&#39;t explicitly declare them to do so.</p><p>The await keyword can only be used inside functions that have the async tag. This also means that we cannot currently utilize it in the global scope.</p><p>Since Node 10, we also have access to the promise.finally method, which allows us to run code regardless of whether the promise resolve or rejected. It can be used to run tasks that we had to call in both the .then and .catch paths previously, saving us some code duplication.</p><h3>Using all of this in Practice</h3><p>As we have just learned several tools and tricks to handle async, it is time to do some practice with fundamental control flows to make our code more efficient and clean.</p><p>Let’s take an example and write a route handler for our web app, where the request can be resolved after 3 steps: validateParams, dbQuery and serviceCall.</p><p>If you’d like to write them without any helper, you’d most probably end up with something like this. Not so nice, right?</p><pre><em>// validateParams, dbQuery, serviceCall are higher-order functions</em><br><em>// DONT</em><br>function handler (done) {<br>  validateParams((err) =&gt; {<br>    if (err) return done(err)<br>    dbQuery((err, dbResults) =&gt; {<br>      if (err) return done(err)<br>      serviceCall((err, serviceResults) =&gt; {<br>        done(err, { dbResults, serviceResults })<br>      })<br>    })<br>  })<br>}</pre><p>Instead of the callback-hell, we can use promises to refactor our code, as we have already learned:</p><pre><em>// validateParams, dbQuery, serviceCall are higher-order functions</em><br>function handler () {<br>  return validateParams()<br>    .then(dbQuery)<br>    .then(serviceCall)<br>    .then((result) =&gt; {<br>      console.log(result)<br>      return result<br>    })<br>    .catch(console.log.bind(console))<br>}</pre><p>Let’s take it a step further! Rewrite it to use the async and await keywords:</p><pre><em>// validateParams, dbQuery, serviceCall are thunks</em><br>async function handler () {<br>  try {<br>    await validateParams()<br>    const dbResults = await dbQuery()<br>    const serviceResults = await serviceCall()<br>    return { dbResults, serviceResults }<br>  } catch (error) {<br>    console.log(error)<br>  }<br>}</pre><p>It feels like a “synchronous” code but still doing async operations one after each other.</p><p>Essentially, a new callback is injected into the functions, and this is how async knows when a function is finished.</p><h3>Takeaway rules for Node.js &amp; Async</h3><p>Fortunately, Node.js eliminates the complexities of writing thread-safe code. You just have to stick to these rules to keep things smooth:</p><p>As a rule of thumb, prefer async, because using a non-blocking approach gives superior performance over the synchronous scenario, and the async — await keywords gives you more flexibility in structuring your code. Luckily, most libraries now have promise based APIs, so compatibility is rarely an issue, and can be solved with util.promisify should the need arise.</p><p>If you have any questions or suggestions for the article, please let me know in the comments!</p><p>In case you’re looking for help with <a href="https://risingstack.com/nodejs-development-consulting-services">Node.js consulting or development</a>, feel free to reach out to us! Our team of experienced engineers is ready to speed up your development process, or <a href="https://risingstack.com/trainings">educate your team on JavaScript, Node, React, Microservices and Kubernetes</a>.</p><p>In the next part of the Node.js at Scale series, we take a look at <a href="https://blog.risingstack.com/event-sourcing-with-examples-node-js-at-scale/">Event Sourcing with Examples</a>.</p><p><em>This article was originally written by Tamas Hodi, and was released on 2017, January 17. The revised second edition was authored by Janos Kubisch and Tamas Hodi and it was released on 2020 February 10.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XphTu9vhKVzExu8F.png" /></figure><p><em>Originally published at </em><a href="https://blog.risingstack.com/node-js-async-best-practices-avoiding-callback-hell-node-js-at-scale/"><em>https://blog.risingstack.com</em></a><em> on February 10, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cae115b85572" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/node-js-async-best-practices-avoiding-callback-hell-risingstack-cae115b85572">Node.js Async Best Practices &amp; Avoiding Callback Hell | @RisingStack</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating a Static Site with Hugo + Netlify]]></title>
            <link>https://medium.com/@RisingStack/generating-a-static-site-with-hugo-netlify-99522a5f138a?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/99522a5f138a</guid>
            <category><![CDATA[netlify]]></category>
            <category><![CDATA[static-site-generator]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[gohugo]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Mon, 20 Jan 2020 14:55:05 GMT</pubDate>
            <atom:updated>2020-01-22T19:10:38.680Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I’m going to show how you can quickly generate a static site with Hugo and Netlify in an easy way.</p><h3>What are static site generators, and why do you need one?</h3><p>Simply put, a static site generator takes your content, applies it to a template, and generates an HTML based static site. It’s excellent for blogs and landing pages.</p><p>Benefits:</p><ul><li>Quick deployment</li><li>Secure (no dynamic content)</li><li>Fast load times</li><li>Simple usage</li><li>Version control</li></ul><p>So, what are the popular options in terms of static site generators?</p><ul><li>Gatsby (React/JS)</li><li>Hugo (Go)</li><li>Next.js (React/JS)</li><li>Jekyll (Ruby)</li><li>Gridsome (Vue/JS)</li></ul><p>These are the most starred projects on GitHub. I’ve read about Hugo previously, and it seemed fun to try out, so I’m going to stick with Hugo.</p><h3>What is Hugo?</h3><p>The official website states that Hugo is the world’s fastest static website engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*kA8FXF5hwaY4TWH4.png" /></figure><p>We can confirm that it’s really fast. Hugo is written in Golang. It also comes with a rich theming system and aims to make building websites fun again.</p><p>Let’s see what we got here.</p><h3>Installing Hugo</h3><p>Mac:</p><pre>brew install hugo</pre><p>Linux:</p><pre>sudo apt-get install hugo</pre><pre>or</pre><pre>sudo pacman -Syu hugo</pre><p>To verify your install:</p><pre>hugo version</pre><h3>Using Hugo</h3><p>Create a new project:</p><pre>hugo new site my-project</pre><p>Add a theme for a quick start. You can find themes <a href="https://themes.gohugo.io/">here</a>.</p><pre>cd my-project<br>git init<br>git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke</pre><p>Add the theme to the config file.</p><pre>echo &#39;theme = &quot;ananke&quot;&#39; &gt;&gt; config.toml</pre><p>Add some content.</p><pre>hugo new posts/my-first-post.md</pre><p>It should look something like this:</p><pre>---<br>title: &quot;My First Post&quot;<br>date: 2020-01-05T18:37:11+01:00<br>draft: true<br>---</pre><pre>Hello World!</pre><p>There are lots of options (tags, description, categories, author) you can write to the front matter details.</p><p>You can read more about the details <a href="https://gohugo.io/content-management/front-matter/">here</a>.</p><p>Take a look at what we made:</p><pre>hugo server -D</pre><p>Open <a href="http://localhost:1313">http://localhost:1313</a></p><h3>Understanding Hugo’s directory structure</h3><pre>.<br>├── archetypes<br>├── assets (not created <strong>by</strong> <strong>default</strong>)<br>├── config.toml<br>├── content<br>├── <strong>data</strong><br>├── layouts<br>├── static<br>└── themes</pre><ul><li><strong>archetypes</strong>: Archetypes are content template files that contain preconfigured front matter (date, title, draft). You can create new archetypes with custom preconfigured front matter fields.</li><li><strong>assets</strong>: Assets folder stores all the files, which are processed by Hugo Pipes. (e.g. CSS/Sass files) This directory is not created by default.</li><li><strong>config.toml</strong>: Hugo uses the config.toml, config.yaml, or config.json (if found in the site root) as the default site config file. Instead of a single config file, you can use a <a href="https://gohugo.io/getting-started/configuration/#configuration-directory">config directory</a> as well to separate different environments..</li><li><strong>content</strong>: This is where all the content files live. Top level folders count as content sections. If you have devops and nodejs sections, then you will have content/devops/first-post.md and content/nodejs/second-post.md directories.</li><li><strong>data</strong>: This directory is used to store configuration files that can be used by Hugo when generating your website.</li><li><strong>layouts</strong>: Stores templates in the form of .html files. See the Styling section for more information.</li><li><strong>static</strong>: Stores all the static content: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is.</li><li><strong>themes</strong>: Hugo theme of your choice.</li></ul><h3>Styling our static site</h3><p>Remember, we applied a theme before. Now, if we inspect the themes folder, we can see the styling files.</p><p>But beware!</p><blockquote><strong>DO NOT EDIT THESE FILES DIRECTLY</strong>.</blockquote><p>Instead, we will mirror the theme directory structure to the root layouts folder.</p><p>Let’s say I want to apply custom CSS to the theme.</p><p>The theme has a themes/theme-name/layouts/partials folder, where we can find some HTML templates (header.html, footer.html). Now we will edit the header.html template, so copy the content from this file to layouts/partials/header.html and be careful to create the same directory structure like the theme&#39;s into the root layouts folder.</p><pre>layouts/partials/<strong>header</strong>.html</pre><pre>themes/theme-name/layouts/partials/<strong>header</strong>.html</pre><p>Create a custom CSS file: static/css/custom-style.css.</p><p>Add the custom css file to config.toml:</p><pre>[params]<br> custom_css = [&quot;css/custom-style.css&quot;]</pre><p>Open layouts/partials/header.html:</p><p>Add this code inside the &lt;head&gt; tag:</p><pre>{{ range .Site.Params.custom_css -}}<br>   &lt;link rel=&quot;stylesheet&quot; href=&quot;{{ . | absURL }}&quot;&gt;<br>{{- end }}</pre><p>Now you can overwrite CSS classes applied by your theme.</p><h3>Deploying our static site to Netlify</h3><p>One of the benefits of a static site is that you can deploy it easily. Netlify or AWS S3 is a very good choice for hosting a static site. Let’s see how to deploy it to Netlify.</p><p>Requirements:</p><ul><li>Netlify account</li><li>Github repository</li></ul><h3>What to do on Netlify</h3><p>1. Create a git repository</p><p>2. Create a netlify.toml file into the root of your project with the content below.</p><pre><strong>[build]</strong><br>publish = &quot;public&quot;  // default hugo build folder<br>command = &quot;hugo --gc --minify&quot; // hugo build command</pre><pre><strong>[context.production.environment]</strong><br>HUGO_VERSION = &quot;0.62.1&quot;<br>HUGO_ENV = &quot;production&quot;<br>HUGO_ENABLEGITINFO = &quot;true&quot;</pre><p>3. Now, if you push your code to Github, Netlify will deploy the site, and blogging shall start.</p><p>4. Connect Netlify and your Git repository</p><p>5. Build and deploy</p><p>You can also take a look at the <a href="https://gohugo.io/hosting-and-deployment/hosting-on-netlify/">Hugo official Netlify hosting details</a> for further information.</p><h3>AWS S3 + CI</h3><p>We will be using Terraform to create an S3 bucket that will host our static site. I assume you have an AWS account.</p><p>Create an s3_bucket.tf file in your project and insert the content below to it:</p><pre>resource &quot;aws_s3_bucket&quot; &quot;my-static-site&quot; {<br>  bucket = &quot;my-static-site&quot;<br>  acl    = &quot;public-read&quot;<br>  <strong>policy</strong> = &lt;&lt;<strong>POLICY</strong><br>{<br>  &quot;Version&quot;:&quot;2012-10-17&quot;,<br>  &quot;Statement&quot;:[<br>    {<br>      &quot;Sid&quot;:&quot;PublicRead&quot;,<br>      &quot;Effect&quot;:&quot;Allow&quot;,<br>      &quot;Principal&quot;: &quot;*&quot;,<br>      &quot;Action&quot;:[&quot;s3:GetObject&quot;],<br>      &quot;Resource&quot;:[&quot;arn:aws:s3:::my-static-site/*&quot;]<br>    }<br>  ]<br>}<br><strong>POLICY</strong></pre><pre>  website {<br>    index_document = &quot;index.html&quot;<br>    error_document = &quot;index.html&quot;<br>  }<br>}</pre><p>Then, folllow these steps:</p><ul><li>execute terraform init</li><li>insert the following code snippet</li></ul><pre>export AWS_ACCESS_KEY_ID=&quot;anaccesskey&quot;<br>export AWS_SECRET_ACCESS_KEY=&quot;asecretkey&quot;<br>export AWS_DEFAULT_REGION=&quot;us-east-1&quot;<br>terraform plan</pre><ul><li>execute terraform apply</li></ul><p>This will create a public readable AWS S3 bucket, which will host the static site.</p><p>Now we have to take care of building the static site on our own: we need a CI tool.</p><h3>Setting up CircleCI for continuous integration</h3><p>At RisingStack, we’re usually using CircleCI for these kinds of tasks. Let’s set up the build process.</p><p>Create the following files in the project root: .circleci/config.yml</p><p>Apply the following code to config.yml:</p><pre>version: 2<br>jobs:<br>  build:<br>    docker:<br>      - image: cibuilds/hugo:latest<br>    working_directory: ~/hugo<br>    environment:<br>      HUGO_BUILD_DIR: ~/hugo/public<br>    steps:</pre><pre>      <em># install git</em><br>      - run: apk <strong>update</strong> &amp;&amp; apk <strong>add</strong> git</pre><pre>      <em># checkout the repository</em><br>      - checkout</pre><pre>      <em># install git submodules for managing third-party dependencies</em><br>      - run: git submodule <strong>sync</strong> &amp;&amp; git submodule <strong>update</strong> <em>--init</em></pre><pre>      - run:<br>          <strong>name</strong>: <strong>install</strong> AWS CLI (<strong>first</strong> <strong>install</strong> pip, the Python <strong>package</strong> manager)<br>          command: |<br>            apk <strong>add</strong> <em>--update python python-dev py-pip build-base</em><br>            pip <strong>install</strong> awscli</pre><pre>      <em># build with Hugo</em><br>      - run: HUGO_ENV=production hugo -v -d $HUGO_BUILD_DIR<br> <br>      - run:<br>          <strong>name</strong>: <strong>test</strong> our <strong>generated</strong> HTML files<br>          command: |<br>            htmlproofer $HUGO_BUILD_DIR <em>--allow-hash-href --check-html \</em><br>            <em>--empty-alt-ignore --disable-external</em></pre><pre>      <em># `deploy` step: identical to a `run` step, but uses only one container:</em><br>      <em># /docs/2.0/configuration-reference/#deploy </em><br>      - deploy:<br>          <strong>name</strong>: deploy <strong>to</strong> AWS<br>          command: |<br>            <strong>if</strong> [ &quot;${CIRCLE_BRANCH}&quot; = &quot;master&quot; ]; then<br>              aws s3 sync $HUGO_BUILD_DIR \<br>              s3://my-static-site <em>--delete</em><br>            else<br>              echo &quot;Not master branch, dry run only&quot;<br>            fi</pre><p>Note: To add AWS credentials, locate the AWS Permissions link under the Permissions section in CircleCI.</p><h3>Moving forward with Hugo</h3><p>Hugo offers so much more you should know about. Discover the official <a href="https://gohugo.io/documentation/">documentation</a> here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*-DFPXigeJeQdEGq-.gif" /></figure><p>If you’d like to check out the very simple page I created, head over to <a href="https://bmz-codez.com/">https://bmz-codez.com/</a></p><p>In case you professional software development services, feel free to reach out to us using our website: <a href="https://risingstack.com/nodejs-development-consulting-services">https://risingstack.com/nodejs-development-consulting-services</a></p><p><em>Originally published at </em><a href="https://blog.risingstack.com/static-site-generator-hugo-netlify/"><em>https://blog.risingstack.com</em></a><em> on January 20, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99522a5f138a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Core Node.js support for ECMAScript modules + other node updates from this week. #49 / 2019]]></title>
            <link>https://medium.com/the-node-js-collection/core-node-js-support-for-ecmascript-modules-other-node-updates-from-this-week-49-2019-cd7aecba35c2?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd7aecba35c2</guid>
            <category><![CDATA[ecmascript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 06 Dec 2019 15:22:27 GMT</pubDate>
            <atom:updated>2019-12-06T17:24:32.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sASdLd14dVGHxyq5.png" /></figure><p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/"><strong>Node.js Consultants</strong></a><strong>.</strong></p><p><a href="https://blog.risingstack.com/update-node-js-latest-version/"><strong>Latest Node.js Updates</strong></a><strong> here:</strong> Node v13.3.0 / LTS v12.13.1</p><h3>The Big News:</h3><h4><a href="https://medium.com/@nodejs/announcing-core-node-js-support-for-ecmascript-modules-c5d6dc29b663">Announcing core Node.js support for ECMAScript modules</a></h4><p>Node.js 13.2.0 ships support for ECMAScript modules, known for their import and export statements. This support was previously behind the --experimental-module flag, which is no longer required; however the implementation remains experimental and subject to change.</p><p>This article discusses</p><ul><li>how you can enable this feature,</li><li>import and export syntax,</li><li>files and the package.json “type” field,</li><li>package entry points and the package.json “exports” field,</li><li>and common gotchas.</li></ul><p>.</p><h4><a href="https://medium.com/@nodejs/publishing-npm-packages-c4c615a0fc6b">npm publishing guidelines from the Node.js package maintenance team.</a></h4><p>We established a baseline and a recommendation guide for publishing packages without meta files, using either the exclude or include support from npm.</p><h3>Node.js Updates (Current and LTS)</h3><h4>Changelog for Node v12.13.1 (LTS)</h4><ul><li>Experimental support for building Node.js with Python 3 is improved.</li><li>ICU time zone data is updated to version 2019c. This fixes the date offset in Brazil.</li></ul><p>.</p><h4>Changelog for Node 13.3.0 (Current)</h4><ul><li><strong>fs:</strong> Reworked experimental recursive rmdir(). The maxBusyTries option is renamed to maxRetries, and its default is set to 0. The emfileWait option has been removed, and EMFILE errors use the same retry logic as other errors. The retryDelay option is now supported. ENFILE errors are now retried.</li><li><strong>http:</strong> Make maximum header size configurable per-stream or per-server</li><li><strong>http2:</strong> Make maximum tolerated rejected streams configurable. Allow to configure maximum tolerated invalid frames.</li><li><strong>wasi:</strong> Introduce initial WASI support</li></ul><p>.</p><h4>Changelog for Node 13.2.0 (Current)</h4><ul><li><strong>addons:</strong> Deprecate one- and two-argument AtExit(). Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook() instead</li><li><strong>child_process,cluster:</strong><br>The serialization option is added that allows child process IPC to use the V8 serialization API (to e.g., pass through data types like sets or maps)</li><li><strong>deps:</strong> Update V8 to 7.9, Update npm to 6.13.1</li><li><strong>embedder:</strong> Exposes the ability to pass cli flags / options through an API as embedder. Allow adding linked bindings to Environment.</li><li><strong>esm:</strong> Unflag --experimental-modules</li><li><strong>stream:</strong> Add writable.writableCorked property</li><li><strong>worker:</strong> Allow specifying resource limits</li><li><strong>v8:</strong> The Serialization API is now stable</li></ul><h3>Awesome Node.js &amp; JavaScript Tutorials:</h3><h4><a href="https://itnext.io/the-observer-pattern-in-nodejs-c0cfffb4744a">The observer pattern in Node.js</a></h4><p>This is one of the pillars of Node and crucial for using many core modules so treating it isolated due to the importance.</p><p>.</p><h4><a href="https://medium.com/better-programming/using-events-in-node-js-the-basics-9a9c44dcbe30">Using Events in Node.js (Part 1)</a></h4><p>The core feature of Node.js is asynchronous programming. This means that code in Node.js may not be executed sequentially. Therefore, data may not be determined in a fixed amount of time. This means that to get all the data we need, we have to pass data around the app when the data is obtained.</p><p>This can be done by emitting, listening to, and handling events in a Node.js app.</p><p>.</p><h4><a href="https://medium.com/softway-blog/automating-lights-with-computer-vision-nodejs-fb9b614b75b2">Automating lights with Computer Vision &amp; Node.js</a></h4><p>This solution is implemented with opencv4Nodejs, which is a Node.js wrapper for popular open-source Computer Vision library OpenCV. Along with socket.io and express for rendering a web app to display a live stream of video and to simulate the turning on and off of lights.</p><p>.</p><h4><a href="https://blog.logrocket.com/natural-language-processing-for-node-js/">Natural language processing for Node.js</a></h4><p>Python is usually the go-to language when the topic is NLP (or ML and AI) because of its wealth of language processing packages like Natural Language Toolkit. However, JavaScript is growing rapidly and the existence of NPM (Node Package Manager) gives its developers access to a large number of packages, including packages to perform NLP for different languages.</p><p>This post will be useful for developers who already use NLP with Python but want to transition to achieve the same results with Node. Complete newbies will also learn a lot about NLP as a technology and its usage with Node.</p><p>.</p><h4><a href="https://www.youtube.com/watch?v=62ZRPJkHOX0">Node.js: Let It Crash!</a></h4><p>This talk presents a series of best practices on how to deal with uncaughtExceptions and unhandledRejections in a way that gives developers visibility on errors, post-mortem information and how to handle graceful shutdowns.</p><h3>Interesting JS &amp; Node Discussions:</h3><h4><a href="https://www.reddit.com/r/javascript/comments/e65p22/optional_chaining_just_achieved_stage_4_at_tc39/">Optional Chaining just achieved Stage 4 at TC39!</a></h4><p>Also making it to stage 4:</p><ul><li>Nullish coalescing Operator</li><li>for-in order</li></ul><p>The agenda has a pretty decent proposal list, as well as items for “Operator overloading for Stage 1” and “BigDecimal for Stage 1” which is pretty exciting.</p><p>.</p><h4><a href="https://news.ycombinator.com/item?id=21623364">Pika — A JavaScript package registry for the modern web</a></h4><p>Pika is a new kind of package registry for the modern web.<br>100% ESM. Write once, run natively on every platform.</p><p>.</p><h4><a href="https://news.ycombinator.com/item?id=21627045">If you care about user privacy, don’t use Facebook JavaScript SDK</a></h4><p>Some SDKs (I’m looking at you Facebook!) inject an iframe in your website to display the Continue as {MyName} or Login with Facebook button. Loading this iframe allows Facebook to know that this specific user is currently on your website. Facebook therefore knows about user browsing behaviour without user’s explicit consent.</p><p><em>Originally published at </em><a href="https://community.risingstack.com/node-js-support-ecmascript-node-weekly-update-49-2019/"><em>https://community.risingstack.com</em></a><em> on December 6, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd7aecba35c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/core-node-js-support-for-ecmascript-modules-other-node-updates-from-this-week-49-2019-cd7aecba35c2">Core Node.js support for ECMAScript modules + other node updates from this week. #49 / 2019</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESM in Node has been unflagged! + other Node.js updates of this week. #46 / 2019]]></title>
            <link>https://medium.com/the-node-js-collection/esm-in-node-has-been-unflagged-other-node-js-updates-of-this-week-46-2019-d805b5d4f93b?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/d805b5d4f93b</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 15 Nov 2019 15:48:12 GMT</pubDate>
            <atom:updated>2019-11-15T18:05:57.720Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oISusqP3cOd0cSqe.png" /></figure><p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/"><strong>Node.js fanatics</strong></a><strong>.</strong></p><p><a href="https://blog.risingstack.com/update-node-js-latest-version/"><strong>Latest Node.js Updates</strong></a><strong> here:</strong> Node v13.0.1 / LTS v12.13.0</p><p><em>Apologies, we’ve been busy in the previous weeks and missed a few installments, therefore content in this article is not exclusively from the previous week.</em></p><h3>The Big News:</h3><p>.</p><h4><a href="https://github.com/nodejs/node/commit/796f3d0af49164314868c4778af90eca356f1fef">ESM in Node has been unflagged!</a></h4><p>esm: unflag — experimental-modules</p><p>.</p><h4><a href="https://developer.ibm.com/blogs/nodejs-13-is-out-heres-what-it-means-for-you/">Node 13 is out, here’s what it means to you</a></h4><p>Learn what’s new in 13 and why you should start thinking about migrating to Node.js 12.</p><p>.</p><h4><a href="https://dev.to/ruyadorno/npm-6-13-0-7f3">Cool new stuff in npm@6.13.0</a></h4><p>A feature npm shipped in this version is a new funding property in package.json — in a bid to help the open source community npm decided to add a new command: npm fund that will provide more visibility to npm users on what dependencies are actively looking for ways to fund their work.</p><p>As part of that change, npm install will also show a single message at the end in order to let the user aware that dependencies are looking for funding, it looks like this:</p><pre>$ npm <strong>install</strong><br>3 packages <strong>are</strong> looking <strong>for</strong> funding.<br>Run &quot;npm fund&quot; <strong>to</strong> find <strong>out</strong> more.</pre><p>.</p><h4><a href="https://github.com/mhdawson/presentations/blob/master/2019/NodeConf%20EU%202019%20-%20Stress%20of%20Success.pdf">The Module Ecosystem — The Stress of Success</a></h4><p>Slides for the prezentation of Dominykas Blyžė &amp; Michael Dawson who share the challenges and opportunities in trying to ensure a healthy and successful package ecosystem.</p><p>.</p><h4><a href="https://nodesource.com/blog/what-happened-to-NodeSource">What happened to NodeSource</a></h4><blockquote>Yes, the company was acquired and is now a part of i2.</blockquote><p>Many of you may have been wondering, “What happened to NodeSource?”, a company that seemed so solid in the Node.js ecosystem, suddenly there was a restructuring of the organization and many of the staff were impacted.</p><p>.</p><h3>Awesome Node.js &amp; JavaScript Tutorials:</h3><p>.</p><h4><a href="https://v8.dev/features/top-level-await">Top-level await</a></h4><p>Top-level await enables developers to use the await keyword outside of async functions. It acts like a big async function causing other modules who import them to wait before they start evaluating their body.</p><p>.</p><h4><a href="https://blog.risingstack.com/jsconf-budapest-2019-videos/">Great Content from JSConf Budapest 2019</a></h4><p>JSConf Budapest is a JSConf family member 2-day non-profit community conference about JavaScript in the beautiful Budapest, Hungary. RisingStack participated in the conf for several years as well as we did this September.</p><p>.</p><h4><a href="https://www.youtube.com/watch?v=GUtd-zEDgjQ">Building Distributed Systems with Node.js</a></h4><p>A great prezentation by James Simpson during NordicJS.</p><p>.</p><h4><a href="https://blog.sqreen.com/building-a-native-add-on-for-node-js-in-2019/">Building a native add-on for Node.js in 2019</a></h4><p>There are two ways to interface C/C++ code with Node.js:</p><ul><li>NAN (Native Abstraction for Node.js) — this is a set of tools for making the interface with V8 simpler and more stable across versions of Node.js. Our code could be broken by changes made on V8 API. It needs to be compiled for each major version of Node.js</li><li>N-API — this is a stable and V8-independent API for building add-ons for Node.js. You compile it once and it will run on all versions of Node.js that support N-API.</li></ul><p>.</p><h4><a href="https://blog.logrocket.com/unit-and-integration-testing-for-node-js-apps/">Unit and integration testing for Node.js apps</a></h4><p>Building tests with your application enables you to:</p><ul><li>Quickly verify that changes to a project do not break expected behavior</li><li>Act as pseudo documentation as path flows are documented</li><li>Easily demonstrate application behaviors</li><li>Quickly take a review of your application’s health and codebase</li></ul><p>.</p><h4><a href="https://blog.apollographql.com/what-i-learned-at-graphql-summit-f61d6fc6680a">What I Learned At GraphQL Summit</a></h4><p>From the two days of talks, roundtables, and hallway conversations, some exciting themes emerged at Summit:</p><ul><li>GraphQL is mature and growing. It’s here to stay, and it’s poised to become the preferred API convention as client-side UI demands grow in complexity.</li><li>The data graph provides numerous architectural advantages for companies with rich client-side experiences. It simplifies client-side data fetching, ensures a much more pleasant developer experience, and improves developer velocity ⚡.</li><li>The React Hooks (useQuery) + Apollo stack is solid. And just fun to code with.</li><li>There’s no free lunch in software. Large-scale GraphQL deployments encounter challenges similar to any other service-based architecture. But teams can mitigate those challenges with tools like 🏘️ federation (to prevent error-prone monoliths and enable the development of separate graphs by cross-cutting teams) and 🔒 schema change validation (to ensure that schema changes don’t break live queries in production).</li></ul><h3>Interesting JS &amp; Node Discussions:</h3><p>.</p><h4><a href="https://www.reddit.com/r/javascript/comments/dtt5d8/on_private_fields_proposal_private_fields_public/">On private fields proposal: Private fields, public worries</a></h4><p>Some of the changes proposed by TC39 Committee (body responsible for EcmaScript standard) arouse more resistance than others. A proposal that recently caused a lot of negative reactions was class fields proposal that — among others — tries to add to the language private class fields.</p><p>.</p><h4><a href="https://www.reddit.com/r/node/comments/dvi70m/esm_in_node_has_been_unflagged/">ESM Unflagged and everyone is happy</a></h4><p>As broofa in the thread pointed out: This fixes two huge issues that have plagued the JS ecosystem for 10+ years:</p><ul><li>Having a consistent module import syntax on all major JS platforms makes it easier for JS devs to work across server/client code bases and, more importantly (imho), module owners no longer have to worry about supporting different module schemes.</li><li>Because ESM modules are statically resolved, packagers can do tree-shaking, to remove not just unused modules, but unused code within those modules.</li></ul><p>.</p><h4><a href="https://www.reddit.com/r/node/comments/dw7rh0/in_your_opinion_what_are_the_topics_an_advanced/">In your opinion, what are the topics an advanced Node.js programmer should know?</a></h4><p>An active discussion on r/node about being an advanced Node.js dev.</p><p>.</p><h4><a href="https://www.reddit.com/r/node/comments/dudw74/why_do_many_devs_hate_nodejs/">Why do many devs hate Node.js? — “fun” discussion on reddit</a></h4><blockquote>There are only two kinds of languages: the ones people complain about and the ones nobody uses. — Bjarne Stroustrup</blockquote><p><em>Originally published at </em><a href="https://community.risingstack.com/esm-node-unflagged-node-weekly-update-46-2019/"><em>https://community.risingstack.com</em></a><em> on November 15, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d805b5d4f93b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/esm-in-node-has-been-unflagged-other-node-js-updates-of-this-week-46-2019-d805b5d4f93b">ESM in Node has been unflagged! + other Node.js updates of this week. #46 / 2019</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Great Content from JSConf Budapest 2019]]></title>
            <link>https://medium.com/the-node-js-collection/great-content-from-jsconf-budapest-2019-b8e8945e3604?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8e8945e3604</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Wed, 06 Nov 2019 16:13:52 GMT</pubDate>
            <atom:updated>2019-11-07T15:34:52.941Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://jsconfbp.com/">JSConf Budapest</a> is a JSConf family member 2-day non-profit community conference about JavaScript in the beautiful Budapest, Hungary. RisingStack participated in the conf for several years as well as we did this September.</p><p>In 2019 we delivered a workshop called <a href="https://jsconfbp.com/workshops/risingstack-graphql">“High-Performance Microservices with GraphQL and Apollo”</a> as our contribution to the event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Y5fORd4-LZFDQ3rk.jpg" /></figure><p>Now I’m happy to share the news with you that all conference talks are available online!</p><h3>Top Picks by the Community:</h3><h3><a href="https://www.youtube.com/watch?v=TtsvMRxmfGA&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=6">Essential JavaScript debugging tools for the modern detective by Rebecca Hill</a></h3><blockquote>Debugging JavaScript can drive developers crazy. It’s not surprising when so many us stick to the trusty console.log — but there are better ways. From tracking down a critical issue in production, to simply struggling to add a new feature and not realising you’ve misread some documentation — debugging skills are used every day but it’s difficult to take the time to improve those skills when the pressure is on.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*TXdb6fIrn-Nm9TxP.png" /></figure><p>This talk will show you some really handy techniques that will level up your skills of deductive reasoning.</p><h3><a href="https://www.youtube.com/watch?v=d4gSor3KyIw&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=14">Take on me, web browsers! by Eva Ferreira</a></h3><blockquote>In 1985 pop music was mesmerized by the a-ha “Take on me” music video. It’s been almost 35 years since then, the world needs new catchy tunes with impressive video animations… on the web.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*p812K1QqyYVgNYOE.png" /></figure><p>In this talk we will explore the bewitching ways we can modify web videos and create immersive experiences worthy of the ’80s using JavaScript and CSS. Let us swim in the why-not possibility of Chroma key, Rotoscoping and more video animation techniques on the web platform!</p><h3><a href="https://www.youtube.com/watch?v=GI2Vo-UQG5w&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=2">API Modernization: Building Bridges As You Cross Them by Shelley Vohr</a></h3><blockquote>In an ecosystem undergoing constant flux, what does it mean for an API to be modern?In this talk, I’ll discuss the work that’s taken place over the last year to deliver modern JavaScript APIs to developers in the Electron project, and the obstacles we encountered along the way.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*fSxbQGSidmQhdPUe.png" /></figure><p>You’ll come away with a deeper understanding of how open source projects can more effectively balance innovation with maintenance, as well as perspectives on how to appropriately consider end-users and their needs when modernization affects the code they use.</p><h3>Check all JSConf videos below:</h3><h3><a href="https://www.youtube.com/watch?v=OkovPZ1mVBI&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=1">Accessibility vs latest Web APIs. Can’t we just get along? by Mauricio Palma</a></h3><blockquote>Unfortunately, we still treat accessibility in the same way we deal with front-end development for older browsers, something to be done at the end. What if I tell you that we can use the latest Web APIs and still offer an inclusive and accessible experience.</blockquote><p>In this talk, you’ll learn how to combine Web APIs such as Speech Recognition and Geolocation, with performant Javascript techniques to create empathic user interfaces.</p><h3><a href="https://www.youtube.com/watch?v=1l55ZH3pm_E&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=3">Testing in production: Ideas, experiences, limits, roadblocks by Jorge Marin</a></h3><blockquote>Are you afraid of testing in production? Do you test in production? Do you use real data?</blockquote><p>By definition testing in production is hard. This talk puts together my experience testing in production a large scale system that affects millions of users. Experience, ideas, limits, roadblocks, tips and more.</p><h3><a href="https://www.youtube.com/watch?v=0H27M9TExvg&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=4">Weaving the web — Programming textile-based interactions by Charlie Gerard</a></h3><blockquote>What if you could interact with interfaces and devices using your clothes? When we think about wearable garments, we usually think of the technology as an output. We might think of LED dresses or designer-made outfits that react to the environment but what if instead, we used this technology as an input, as a way to interact with other things.</blockquote><p>This talk walks you through the process of making interactive clothing using conductive textile. Also Charlie shows what it can do and talks about the possibilities and limits of such technology.</p><h3><a href="https://www.youtube.com/watch?v=boQhrk-AKMM&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=5">Composing music with composed functions by Adam Giese</a></h3><blockquote>Functional programming can be difficult to learn. Although there are many practical lessons, they are often hidden through academic lingo and dry examples. What if these basics could be livened up and taught through the lens of music?</blockquote><p>Together, we will go over some of the basics of functional programming including functional array manipulation, closure, immutability, and composing functions. Adam also shows how they can be applied to the creation of music and musical instruments using the web audio API.</p><h3><a href="https://www.youtube.com/watch?v=pCCTMo6reHU&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=7">How not to read the room: Creating socially awkward wearables by Stephanie Nemeth</a></h3><blockquote>I’m introvert. This can be bit unfortunate, when you are a person that enjoys spending a lot of their free time creating things bedazzled with LEDs… only to rarely wear them out in public. ¯\_(ツ)_/¯ In an effort to actually share my weird and wonderful creations with others, I decided create a wearable project that would force me to be sociable in order for it to reveal its magic.</blockquote><p>In this talk, Stephanie shares how she used machine learning with javascript and tiny computers to make “fashion” that is responsive to the people around you and the attention you are (or aren’t) receiving.</p><h3><a href="https://www.youtube.com/watch?v=j4UMWk6Zr0Q&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=8">Taming Git-osaurus Using Mystical Trees by Damini Satya Kammakomati</a></h3><blockquote>Raise your hands if you all start to panic when you mess up your local git workflow, trying frantically to save your work and eventually giving in to the complications thereby deleting your repository. Well, Git isn’t the terrible dinosaur you think it is, on the contrary, the messier it becomes, the more interesting it gets.</blockquote><p>This session aims to make friends with Git and to express the hidden gems in the mysterious git land which will definitely help you to become more productive and look cool in front of your peers struggling with a git-gone-wild.</p><h3><a href="https://www.youtube.com/watch?v=OnOCq8GaG4Q&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=9">Web Norms of the World: An exploration of the internet beyond the West by Kat Kitay</a></h3><blockquote>Flat, muted minimalism, vast fields of whitespace, millennial pink landing pages: the internet today, amirite? In this talk, we’ll take stock of these biases and take a culturally relativistic look at the internet outside of our comfort zone. We’ll explore questions like: Why are Japanese websites so information-dense? How does a script like Arabic, read right to left, affect web design? What languages do (or can) programmers across the world use?</blockquote><p>The viewers of this talk will walk away with a fresh perspective and ideas for improving our web and making technology that’s more inclusive of a global audience.</p><h3><a href="https://www.youtube.com/watch?v=RluWQ8Lfyg8&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=10">Legendary Lambdas by Tejas Kumar</a></h3><blockquote>The Serverless paradigm is one that is slowly taking over the internet. This talk dives deep into Serverless, particularly Serverless Lambda Functions, and their benefits and drawbacks to web applications. We will also discuss how they can benefit business, being extremely cheap to implement and maintain.</blockquote><p>As a practical, technical case study, we will examine serverless performance across a number of popular front-end UI frameworks and measure various metrics relevant to a serverless application.</p><h3><a href="https://www.youtube.com/watch?v=t9XBzM6Tdmk&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=11">Mastering UIs with Finite State Machines by Rubén Sospedra</a></h3><blockquote>Did you ever feel like monkey patching your UI component? Adding too many if/else, handling a lot of complexity or hacking several non-desired side effects. Did you ever have a problem with double-clicking an async button? Fetching multiple times the same resource in a row? Did you have problems translating UX interfaces and mock-ups into your applications scenes?</blockquote><p>All this kind of problems can be properly fixed by applying a different point of view. An architecture based upon Mealy state machines. Also known as finite state machines or automatas. These machines are deterministic, pure and idempotents. Opening a new set of possibilities from predictable components to autogenerated tests.</p><h3><a href="https://www.youtube.com/watch?v=k46qeHzKbuY&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=12">Deciphering Brainwaves with the Web Audio API by Braden Moore</a></h3><blockquote>Early last year, my colleagues and I did something amazing — using only JavaScript, the browser, and the Web Audio API, we were able to decipher brainwaves. It sounds sensational, but it’s (mostly) true. This is a story about how we converted brainwaves into audio signals — and then back again — to solve the problem of epilepsy diagnosis on the web.</blockquote><p>In this talk, you’ll get to see a new browser API being used in a novel and unprecedented way, combined with world-leading innovations in the field of epilepsy diagnosis. You’ll learn about the challenges of real-time brainwave filtering and how we solved them. As you’ll see, the technologies we use each day can sometimes be applied in unexpected ways.</p><h3><a href="https://www.youtube.com/watch?v=nS36D2zUkvA&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=13">A privacy first period tracker? Is it even possible? by Benedicte Raae</a></h3><blockquote>Do I want to track my cycles? Yes. Do I want the tracker to push my data to a third party? Hell NO! Do I want the data lying around unencrypted in a database somewhere? Not really. Do I want backup and access from multiple devices? Kinda.. What would I need to learn and is it even possible?</blockquote><p>Learn how Benedicte created a secure and private web-based period tracker.</p><h3><a href="https://www.youtube.com/watch?v=3H8pF6yoSgU&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=15">StrangerDanger: Finding Security Vulnerabilities Before They Find You! by Liran Tal</a></h3><blockquote>Open source modules on the NPM ecosystem are undoubtedly awesome. However, they also represent an undeniable and massive risk. You’re introducing someone else’s code into your system, often with little or no scrutiny. The wrong package can introduce severe vulnerabilities into your application, exposing your application and your user’s data.</blockquote><p>This talk will use a sample application, Goof, which uses various vulnerable dependencies, which we will exploit as an attacker would. For each issue, we’ll explain why it happened, show its impact, and — most importantly — see how to avoid or fix it.</p><h3><a href="https://www.youtube.com/watch?v=JrO3qjBSddY&amp;list=PL37ZVnwpeshEMCvdYDdZ09Sy-toTftWu0&amp;index=16">Testing presentation components visually by Balázs Korossy-Khayll</a></h3><blockquote>You have written all the unit tests, integration and e2e tests imaginable to your project, your code coverage is in the skies, you are sure that everything is in working order, your application is ready to ship. Or is it? Frontend developers often face the challenge that even a plethora of tests don’t cover visual differences, and while the functionality might be working and protected by tests, we don’t know much about the layout’s and visual styles’ correctness.</blockquote><p>Writing unit tests or manual testing for visual styles is tiresome and error-prone, so at BlackRock we came up with a better solution. Using Storybook we have developed a way of comparing visual differences of the rendered images of our presentational components.</p><p><em>Originally published at </em><a href="https://blog.risingstack.com/jsconf-budapest-2019-videos/"><em>https://blog.risingstack.com</em></a><em> on November 6, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8e8945e3604" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/great-content-from-jsconf-budapest-2019-b8e8945e3604">Great Content from JSConf Budapest 2019</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Node.js Update #Week 42 of 2019. 18 October]]></title>
            <link>https://medium.com/the-node-js-collection/the-node-js-update-week-42-of-2019-18-october-6fdc09310741?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fdc09310741</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 18 Oct 2019 15:25:26 GMT</pubDate>
            <atom:updated>2019-10-18T15:29:23.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0xY0Rzp_0DDy_gy1.png" /></figure><p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/"><strong>Node.js Consultants</strong></a><strong>.</strong></p><p><a href="https://blog.risingstack.com/update-node-js-latest-version/"><strong>Latest Node.js Updates</strong></a><strong> here:</strong> 10.16.3 LTS / 12.12.0 Current</p><h3>First, let’s start with “official” Node news:</h3><h4><a href="https://blog.risingstack.com/update-node-js-latest-version/">Node v12.12.0 Current Released. Changelog:</a></h4><ul><li><strong>build:</strong> Add — force-context-aware flag to prevent usage of native node addons that aren’t context aware</li><li><strong>deprecations:</strong> Add documentation-only deprecation for process._tickCallback()</li><li><strong>esm:</strong> Using JSON modules is experimental again</li><li><strong>fs:</strong> Introduce opendir() and fs.Dir to iterate through directories</li><li><strong>process:</strong> Add source-map support to stack traces by using --enable-source-maps</li><li><strong>tls:</strong></li><li>Honor pauseOnConnect option</li><li>Add option for private keys for OpenSSL engines</li></ul><h4><a href="https://github.com/nodejs/node/pull/29504">Node.js 13.0.0 (Current)</a></h4><p>Did you know that you can already check out Node 13?</p><h4><a href="https://github.com/features/package-registry">GitHub Package Registry Beta Announcement</a></h4><p>With the GitHub Package Registry you can safely publish and consume packages within your org.</p><h4><a href="https://www.techrepublic.com/article/npm-is-moving-back-to-its-developer-roots-founder-says/">npm is moving back to its developer roots, founder says</a></h4><p>According to Isaac Schlueter, the right strategy for “building a sustainable engine behind an open source labor of love” might well be a return to npm’s roots.</p><h3>Awesome Node.js &amp; JavaScript Tutorials:</h3><h4><a href="https://blog.servicebot.io/how-to-build-a-onboarding-flow-with-stripe-billing/">Build a Stripe Billing onboarding flow with Node and React</a></h4><p>In this article we will be going over the steps needed to integrate Stripe Billing with an onboarding flow using Node.js and React. In the guide we will be:</p><ul><li>Configuring a Stripe account with a pricing strategy we will be using in this example</li><li>Setting up a Route in ExpressJS which will expose the pricing strategy to the front-end</li><li>Setting up a React front-end which will handle the onboarding flow, utilizing Stripe Elements for checkout</li></ul><h4><a href="https://blog.bitsrc.io/build-command-line-spinners-in-node-js-3e432d926d56">Build Command-Line Spinners in Node.js</a></h4><p>Practice your Node.js-terminal skills by building your own CLI spinners.</p><h4><a href="https://blog.bitsrc.io/coloring-your-terminal-using-nodejs-eb647d4af2a2">Coloring Your Terminal Using Nodejs</a></h4><p>Chalk has been the most widely used library for adding color effects on our Node CLI project. Most people are unaware of how Sindre Sorhus implemented the library, so I decided to take my time out to write about it.</p><p>In this post, we will see how to write colors to our terminal using Node.js.</p><h4><a href="https://pawelgrzybek.com/til-the-power-of-json-stringify-replacer-parameter/">The Power of JSON.STRINGIFY replacer parameter</a></h4><p>I had an interesting problem that melted my brain a bit. Let me share what I have learned and maybe save you a few moments when you come across a similar challenge.</p><h4><a href="https://medium.com/trabe/continuation-local-storage-for-easy-context-passing-in-node-js-2461c2120284">Continuation Local Storage for easy context passing in Node.js</a></h4><p>Recently I’ve been working on a Node.js project where we needed to keep track of which requests were generating calls to some other pieces of code. Passing a request identifier around was not viable since it would require to change too many APIs.</p><p>We solved the problem using cls-hooked, a small package that uses the async_hooks experimental Node.js API to implement Continuation Local Storage.</p><h4><a href="https://blog.logrocket.com/the-perfect-architecture-flow-for-your-next-node-js-project/">The perfect architecture flow for your next Node.js project</a></h4><p>We can all agree that our project architecture is extremely important, and we can also declare a few points that can help us determine what this architecture must help us do:</p><ul><li>Achieve clean and readable code</li><li>Achieve reusable pieces of code across our application</li><li>Help us to avoid repetitions</li><li>Make life easier when adding a new feature into our application</li></ul><h3>Interesting JS &amp; Node Discussions:</h3><h4><a href="https://www.reddit.com/r/javascript/comments/diqf6y/7_simple_but_tricky_javascript_interview_questions/">7 Simple but Tricky JavaScript Interview Questions</a></h4><p>Do people really ask questions like these?</p><h4><a href="https://www.reddit.com/r/javascript/comments/dicyzj/npm_is_moving_back_to_its_developer_roots_founder/">npm is moving back to its developer roots, founder says</a></h4><p>Hard times for npm when github prepares to step in.</p><h4><a href="https://www.reddit.com/r/javascript/comments/di4sut/should_we_rebrand_javascript/">Should We Rebrand JavaScript?</a></h4><p>Recruiters are still confusing Java and JavaScript…</p><p><em>Originally published at </em><a href="https://community.risingstack.com/the-node-js-update-week-42/"><em>https://community.risingstack.com</em></a><em> on October 18, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fdc09310741" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/the-node-js-update-week-42-of-2019-18-october-6fdc09310741">The Node.js Update #Week 42 of 2019. 18 October</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Node.js Update #Week 40 of 2019. 4 October]]></title>
            <link>https://medium.com/the-node-js-collection/the-node-js-update-week-40-of-2019-4-october-da6949f1b5ce?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/da6949f1b5ce</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 04 Oct 2019 15:23:40 GMT</pubDate>
            <atom:updated>2019-10-07T13:17:18.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYQitScB3ex3XbShg_DT2g.png" /></figure><p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/"><strong>Node.js Developers</strong></a><strong>.</strong></p><p><a href="https://blog.risingstack.com/update-node-js-latest-version/"><strong>Latest Node.js Updates</strong></a><strong> here:</strong> 10.16.3 LTS / 12.11.1 Current</p><h3>First, let’s start with “official” Node news:</h3><h4><a href="https://blog.risingstack.com/update-node-js-latest-version/">Node 12.11.1 Current Release</a></h4><ul><li><strong>build:</strong> This release fixes a regression that prevented from building Node.js using the official source tarball</li><li><strong>deps:</strong> Updated small-icu data to support “unit” style in the Intl.NumberFormat API</li></ul><p>-</p><h4><a href="https://openjsf.org/blog/2019/10/03/openjs-foundation-welcomes-first-project-node-version-manager-nvm/">OpenJS Foundation welcomes first Incubating project: Node Version Manager (nvm)</a></h4><p>nvm will be the first project to enter the OpenJS Foundation’s incubation process after the merger of the JS Foundation and the Node.js Foundation. nvm is the most common and widely used method to install Node.js, and the most common tool to manage multiple installed Node.js versions.</p><p>-</p><h4><a href="https://blog.risingstack.com/update-nodejs-8-end-of-life-no-support/">Update Now! Node.js 8 is Not Supported from 2020.</a></h4><p>The Node.js 8.x Maintenance LTS cycle will expire on December 31, 2019 — which means that Node 8 won’t get any more updates, bug fixes or security patches. In this article, we’ll discuss how and why you should move to newer, feature-packed, still supported versions (like <a href="https://blog.risingstack.com/node-js-12-new-features/">Node 12 — check out the new features here</a>).</p><p>We’re also going to pinpoint issues you might face during the migration, and potential steps you can take to ensure that everything goes well.</p><p>-</p><h4><a href="https://v8.dev/blog/v8-release-78">V8 release v7.8</a></h4><p>This post provides a preview of some of the highlights in anticipation of the release.</p><ul><li>Script streaming on preload</li><li>Faster object destructuring</li><li>Lazy source positions</li><li>Faster RegExp match failures</li><li>WebAssembly C/C++ API</li><li>Improved startup time</li></ul><h3>Awesome Node.js &amp; JavaScript Tutorials:</h3><h4><a href="https://www.youtube.com/watch?v=fTBwD3sb5mw">16-Bit Virtual Machine in JavaScript 001</a></h4><p>In this episode we begin implementing a 16-bit virtual machine from scratch in JavaScript. The concepts of computation are introduced, along with the basics of assembly language and machine code.</p><p>-</p><h4><a href="https://khalilstemmler.com/articles/software-design-architecture/full-stack-software-design/">How to Learn Software Design and Architecture</a></h4><p>Software Design and Architecture is pretty much it’s own field of study within the realm of computing, like DevOps or UX Design. Here’s a map describing the breadth of software design and architecture, from clean code to microkernels.</p><p>-</p><h4><a href="https://blog.logrocket.com/building-photo-gallery-app-from-scratch-chakra-ui/">Building a photo gallery app from scratch with Chakra UI</a></h4><p>React is now one of the most battle-tested and mature front-end frameworks in the world, and Express.js is its counterpart among back-end/server frameworks. If you’re building an app today, you can’t pick a better duo than this. In this post, I will walk you through building a complete app using these two frameworks, plus Chakra UI for component styling.</p><p>-</p><h4><a href="https://medium.com/@yanntorres/using-http-2-with-next-js-express-917791ca249b">Using HTTP/2 with Next.js &amp; Express</a></h4><p>Node.js introduced native HTTP/2 support through the http2 built-in package in its version 8 of July 2017 as an experimental feature, and as a stable one into Node.js 10 LTS.</p><p>-</p><h4><a href="https://medium.com/@aamirpinger/react-express-node-js-and-mongodb-mern-stack-microservices-based-application-deployment-on-ec4607cec74d">React, Express, Node Js, and MongoDB (MERN Stack) microservices-based application deployment on Kubernetes</a></h4><p>This article will help step by step on how we can deploy a basic microservices-based application having front-end → backend → database layer to the Kubernetes cluster as separate stand-alone entities and make them scalable.</p><p>-</p><h4><a href="https://dev.to/bnb/an-unintentionally-comprehensive-introduction-to-github-actions-ci-blm">An Unintentionally Comprehensive Introduction to GitHub Actions CI</a></h4><p>We’re currently approaching GitHub Actions v2 shipping publicly for everyone to use. I’m personally super excited about this because it means I don’t need to configure an external service to run my CI — I can slap in some YAML, and I’m off with a cross-platform (!) CI system with multiple versions of Node.js installed.</p><p>-</p><h4><a href="https://blog.bitsrc.io/writing-an-rpc-library-in-node-js-673632413f5f">Writing an RPC library in Node.js</a></h4><p>In case you didn’t know, GraphQL and REST aren’t the only client-server interaction patterns in history. Yes, they are the most popular ones at the moment and with good reason! But at the beginning (especially then) one of the first ways developers started envisioning shared functionality between client and servers was using what they called Remote Procedure Call. In other words, they wanted to use remote code locally, and in the process hiding the complexities of the remote call.</p><p>-</p><h4><a href="https://devinduct.com/blogpost/48/8-new-es10-es2019-features-by-example">8 New ES10 (ES2019) Features by Example</a></h4><p>This is a list of (8) new ES features we will be covering here:</p><ul><li>Optional Catch Binding</li><li>Object.fromEntries</li><li>Array.flat</li><li>Array.flatMap</li><li>String#{trimStart,trimEnd}</li><li>Dynamic Import</li><li>globalThis object</li></ul><p>-</p><h4><a href="https://medium.com/better-programming/deploy-node-application-on-aws-elastic-beanstalk-acb34998211">Deploy Node Applications on AWS Elastic Beanstalk</a></h4><p>This article is focused around deploying a simple web application to the AWS cloud platform. We will be deploying the application to Elastic Beanstalk.</p><h3>Interesting JS &amp; Node Threads:</h3><h4><a href="https://www.reddit.com/r/node/comments/dbb4f1/where_can_i_learn_about_production_ready_proper/">Where can I learn about production ready, proper architecture best practices for nodejs servers?</a></h4><h4><a href="https://www.reddit.com/r/node/comments/dbo31p/what_is_your_view_on_nest_js_framework/">What is your view on the nest.js framework?</a></h4><h4><a href="https://www.reddit.com/r/node/comments/dady7m/i_created_a_orm_using_redis_suitable_for/">I created a ORM using Redis, suitable for microservices</a></h4><h4><a href="https://www.reddit.com/r/javascript/comments/dbh0n2/optional_chaining_has_landed_on_typescript_master/">Optional chaining has landed on TypeScript master branch</a></h4><h4><a href="https://www.reddit.com/r/javascript/comments/da19f4/announcing_gatsbys_15m_series_a_funding_round/">Announcing Gatsby’s $15M Series A Funding Round</a></h4><h3>Like what you read?</h3><p>Share / like the post, and come back next week! :)</p><p><em>Originally published at </em><a href="https://community.risingstack.com/node-js-weekly-update-2019-40/"><em>https://community.risingstack.com</em></a><em> on October 4, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da6949f1b5ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/the-node-js-update-week-40-of-2019-4-october-da6949f1b5ce">The Node.js Update #Week 40 of 2019. 4 October</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Node.js Update #Week 39 of 2019. 27 September]]></title>
            <link>https://medium.com/the-node-js-collection/the-node-js-update-week-39-of-2019-27-september-79c118ca06c0?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/79c118ca06c0</guid>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 27 Sep 2019 12:12:59 GMT</pubDate>
            <atom:updated>2019-09-27T14:39:30.081Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/"><strong>Node.js Developers</strong></a><strong>.</strong></p><h3>First, let’s start with “official” Node.js news:</h3><h4><a href="https://blog.risingstack.com/update-node-js-latest-version/">Node v12.11.0 (Current) Released</a></h4><p>Changelog:</p><ul><li><strong>crypto: </strong>Add oaepLabel option</li><li><strong>deps:</strong> Update V8 to 7.7.299.11</li><li><strong>events: </strong>Add support for EventTarget in once</li><li><strong>fs: </strong>Expose memory file mapping flag UV_FS_O_FILEMAP</li><li><strong>inspector: </strong>New API — Session.connectToMainThread</li><li><strong>process: </strong>Initial SourceMap support via env.NODE_V8_COVERAGE</li><li><strong>stream: </strong>Make _write() optional when _writev() is implemented</li><li><strong>tls: </strong>Add option to override signature algorithms</li><li><strong>util: </strong>Add encodeInto to TextEncoder</li><li><strong>worker: </strong>The worker_thread module is now stable</li></ul><h4><a href="https://www.theregister.co.uk/2019/09/20/npm_ceo_bryan_bogensbergers_off/">npm CEO Bryan Bogensberger Resigned after 9 months on the job</a></h4><p>An internal message to NPM staff from company co-founder Isaac Schlueter, seen by The Register, admits this has been a rough year for the software company, and that Bogensberger’s departure “will probably be interpreted as negative news, or chalked up as a win for folks who have been critical of NPM.”</p><p>Additional discussion &amp; background info:</p><ul><li>On <a href="https://news.ycombinator.com/item?id=21029131">Hacker News</a></li><li>On <a href="https://www.reddit.com/r/javascript/comments/d6zhb0/npm_inc_announces_leadership_change_ceo_bryan/">/r/JavaScript</a></li></ul><h4><a href="https://blog.logrocket.com/new-es2019-javascript-features-every-developer-should-be-excited-about/">New ES2019 JavaScript features every developer should be excited about</a></h4><p>This article goes trough the many benefits of new additions to JavaScript. These additions enhance the developer experience by reducing verbosity and increasing readability.</p><ul><li>Optional chaining</li><li>Optional catch binding</li><li>The pipeline operator</li><li>String.trimStart and String.trimEnd</li><li>Object.fromEntries</li><li>Flat and FlatMap</li></ul><p>You can also read the <a href="https://www.ecma-international.org/ecma-262/10.0/index.html#sec-intro">Official ECMA Docs</a> here.</p><h4><a href="https://chromium.googlesource.com/v8/v8.git/+/0ceee9ad28c21bc4971fb237cf87eb742fc787b8%5E%21/">Top level await support is being added to V8</a></h4><p>Adds support for parsing top level await to V8, as well as<br>many tests.</p><h3>Interesting JS &amp; Node Threads:</h3><h4><a href="https://www.reddit.com/r/node/comments/d9je8a/recommendation_for_sql_orm/">Recommendation for SQL ORM</a></h4><p>“So those who are constantly working with Node JS, please suggest some good SQL ORMs. Currently, I work with Node only when I am permitted to work with NoSQL databases (because NoSQL/Mongo suits better with Javascript). But when I have to use SQL (which is in most cases), I try to avoid Node because of ORM. Please note that I haven’t used any Node ORM before.”</p><h4><a href="https://www.reddit.com/r/node/comments/d8jstq/thoughts_on_nestjs/">Thoughts on Nestjs?</a></h4><p>Interesting discussion on /r/Node.</p><h4><a href="https://www.reddit.com/r/javascript/comments/d8goc2/askjs_can_we_stop_treating_es2015_features_as_new/">Can we stop treating ES2015 features as new yet?</a></h4><p>“This is a bit of a rant, but I’ve been frustrated recently by devs treating 4-year-old features (yes, ES2015 features have been in the standard for 4 years!) as something new. I’ve been told that my code looks like I’m trying to show off that I know ES2015. I don’t know what that even means at this point, it’s just part of the javascript language.”</p><h3>Awesome Node.js &amp; JavaScript Tutorials:</h3><h4><a href="https://qvault.io/2019/09/22/thinking-about-recursion-how-to-recursively-traverse-json-objects-and-the-filesystem/">Thinking about Recursion: How to Recursively Traverse JSON Objects and the Filesystem</a></h4><p>It is important to be able to recognize when a problem is best solved recursively, and to be able to write it when the time comes.</p><h4><a href="https://enmascript.com/articles/2019/09/20/two-exceptional-use-cases-for-the-spread-operator-you-may-not-know-of">Two exceptional use cases for the spread operator you may not know of</a></h4><p>One of the most popular features used in javascript after Ecmascript 2015 is without question the spread operator. In this short “Did you know” article, we will explore a couple of exceptional use cases that we consider to be very useful but that are not so well known.</p><h4><a href="https://medium.com/@dannymoerkerke/what-you-need-to-know-about-asynchronous-programming-in-javascript-894f90a97941">What You Need to Know About Asynchronous Programming in JavaScript</a></h4><p>If you want to be a serious JavaScript developer then asynchronous programming should be second nature. You should know this stuff like a baker knows bread.</p><h4><a href="https://www.valentinog.com/blog/typescript/">TypeScript Tutorial For Beginners: The Missing Guide (2019)</a></h4><p>What is TypeScript and why you may want to use it? Learn more with this TypeScript tutorial for beginners and start adding types to your JavaScript code in minutes!</p><h4><a href="https://itnext.io/you-might-not-need-a-framework-79444bda50d2">You Might Not Need a Framework</a></h4><p>“I wanted to showcase how much JavaScript has grown, and point out that there might be some simple use-cases, where using a framework might be overkill. Please don’t port your 200 component React app with complex state management to a native JavaScript app. That will just make everyones life harder.”</p><h4><a href="https://medium.com/coinmonks/start-developing-hyperledger-fabric-chaincode-in-node-js-e63b655d98db">Start Developing Hyperledger Fabric Chaincode in Node.js</a></h4><p>Chaincode can be written in Go, Nodejs, Java. Compared to the other two languages, Node.js is a language that more people understand and find easier to use including me. But, still writing and deploying Node.js Chaincode is little tricky due to very less information available in its documentation.</p><h4><a href="https://medium.com/swlh/node-js-with-react-on-a-multi-docker-container-in-development-and-in-production-8633c159514a">Node.js with React on a multi-docker container: in development and in production</a></h4><p>It’s been quite the journey to feel at ease with Docker and set up a pipeline that works both in development and in production.</p><h4><a href="https://www.datadoghq.com/blog/node-logging-best-practices/">How to collect, customize, and centralize Node.js logs</a></h4><p>In this guide, we will walk through collecting, customizing, and enriching your Node.js logs with Winston, and then show you how to centralize those logs to get deep visibility into your applications. You will learn how to:</p><ul><li>Create your own logger and customize its output</li><li>Enrich your logs with metadata, custom formats, and exception handling</li><li>Dig into your Node.js logs with Datadog</li></ul><h4><a href="https://www.youtube.com/watch?v=oykl1Ih9pMg">Full Node.js Deployment — NGINX, SSL With Lets Encrypt</a></h4><p>In this video we will do a full deployment of Node.js using PM2 and an NGINX reverse proxy and a free SSL from Lets Encrypt to a DigitalOcean droplet.</p><h3>Like what you read?</h3><p>Share / like the post, and come back next week! :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_hATNus5MCoI8xllu_y4vw.png" /></figure><p><em>Originally published at </em><a href="https://community.risingstack.com/node-js-weekly-update-2019-39/"><em>https://community.risingstack.com</em></a><em> on September 27, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79c118ca06c0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/the-node-js-update-week-39-of-2019-27-september-79c118ca06c0">The Node.js Update #Week 39 of 2019. 27 September</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Node.js Update #Week 36 of 2019. 20 September]]></title>
            <link>https://medium.com/the-node-js-collection/the-node-js-update-week-36-of-2019-20-september-ee23dedc429?source=rss-558809ba0720------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee23dedc429</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[RisingStack]]></dc:creator>
            <pubDate>Fri, 20 Sep 2019 09:56:12 GMT</pubDate>
            <atom:updated>2019-09-20T14:05:46.842Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Below you can find a collection of the most important Node.js updates, tutorials &amp; announcements from this week — curated by RisingStack’s </strong><a href="https://risingstack.com/">Node.js Developers</a><strong>.</strong></p><p><a href="https://blog.risingstack.com/update-node-js-latest-version/">Latest Node.js Updates</a><strong> here:</strong> 10.16.3 LTS / 12.10.0 Current</p><h3>First, let’s start with “official” Node news:</h3><h4><a href="https://njsi2019.sched.com/">Node + JS Interactive Schedule Announced (December 11–12)</a></h4><p>At Node+JS Interactive, attendees, speakers and sponsors will collaborate, network and learn from each other as they share their experiences deploying IoT, serverless, cloud native and progressive web apps, and much more.</p><h4><a href="https://community.risingstack.com/node-js-weekly-update-2019-38/LINK">from npm: Avoiding the Tragedy of the Commons: Acceptable Use of the Public Registry</a></h4><p>While nearly all of the registry’s 11 million users fall well within the limits of acceptable use, there is a small number of outliers — all large commercial enterprises who use the registry for free — that consistently make tens to hundreds of millions of registry requests per month, falling well outside any reasonable scope of acceptable use.</p><h3>Interesting JS &amp; Node Threads:</h3><h4><a href="https://www.reddit.com/r/node/comments/d44jo2/do_you_guys_prefer_mongodb_or_postgresql/">Do you guys prefer MongoDB or PostgreSQL?</a></h4><p>“So a lot of the tutorials I used to learn node.js seem to focus on NoSQL databases like MongoDB or Firebase, but everyone is saying that this is bad practice, and we should all use relational databases like MySQL and PostgreSQL. I’m wondering what do you guys prefer, and at the end of the day does it really matter?”</p><h4><a href="https://www.reddit.com/r/javascript/comments/d5vn9f/research_shows_that_global_demand_for_javascript/">Research shows that global demand for JavaScript is outpacing student expertise</a></h4><p>“JS is slowly but surely eating the entire web-dev industry. There’s a common theory that in order to get big all a language needs is to be “the” native programming language of a popular/dominant platform, and JS is the native language for the web, without a shadow of a doubt the most powerful platform in the history of computing.”</p><h4><a href="https://www.reddit.com/r/javascript/comments/d6ddek/cheat_sheet_for_moving_from_jquery_to_vanilla/">Cheat sheet for moving from jQuery to vanilla JavaScript</a></h4><p>“It’s nice to see people talking about moving away from jQuery. I get extremely frustrated when looking for answers to JS questions and every. single. SO. answer is “just use this jQuery.” It’s like the entire internet has either forgotten, or has no idea, how to use vanilla JS.”</p><h4><a href="https://www.reddit.com/r/javascript/comments/d46ow5/are_you_making_your_website_vulnerable_or/">Are you making your website vulnerable or compromising the performance by adding target=”_blank”?</a></h4><p>TL;DR: Use rel=”noopener noreferrer”.</p><h4><a href="https://www.reddit.com/r/node/comments/d4crgz/best_solution_for_authentication/">Best solution for authentication (40+ comments)</a></h4><p>“Hi everyone. I am planning to create MVP for my app which is going to be SaaS. As it will be MVP probably in the future I will change some things but I would like to create strong roots and I am thinking about which solution should I use for authentication. JWT, use external library Passport.js or something else?”</p><h4><a href="https://www.reddit.com/r/node/comments/d5iwfx/learn_nodejs_by_solving_real_world_production/">Learn Node.js By Solving Real world Production Problem Scenarios</a></h4><p>“Why can’t we have a platform like leetcode, TopCoder for solving just a business problem scenarios which helps me to learn and put it in my portfolio?To start an initiative to address this problem, I have consolidated some business problem scenarios in a GitHub Repo.”</p><h3>Awesome Node.js Tutorials:</h3><h4><a href="https://www.jsmonday.dev/articles/34/writing-a-blockchain-in-node-js">Writing a Blockchain in Node.js</a></h4><p>Blockchain is an incredibly hot topic in computer science these days. It become famous in 2008 thanks to the Bitcoin cryptocurrency, which (as you may know) uses a Blockchain in order to record every transaction into a public distributed ledger.</p><p>But… how much do we know about Blockchain? What if we want to understand how Blockchain works and what makes it so powerful? How should we start?</p><h4><a href="https://medium.com/@stressed83/live-streaming-data-using-kafka-node-js-websocket-and-chart-js-8750acad549c">Live Streaming Data Using Kafka, Node.js, WebSocket and Chart JS</a></h4><p>The reason for writing down this story is not to define something which might sound quite obvious but to allow reader to be able to follow the steps and have a working example. I found articles related to this topic on google but hardly found a step to step instruction that i could follow. And being new to Kafka &amp; Node.js it could be daunting.</p><h4><a href="https://khalilstemmler.com/articles/software-design-architecture/organizing-app-logic/">The 6 Most Common Types of Logic in Large Applications [with Examples]</a></h4><p>In this article, you’ll learn about the Clean Architecture, why we should separate the concerns of large applications into layers, the 6 most common types of application logic, and which layer they belong to.</p><h4><a href="https://blog.logrocket.com/full-text-search-with-node-js-and-elasticsearch-on-docker/">Full-text search with Node.js and ElasticSearch on Docker</a></h4><p>For those who don’t know, ElasticSearch is a search engine server built on top of Lucene with an amazing distributed-architecture support. According to db-engines.com, it is currently the most used search engine out there.</p><p>In this post, we are going to build a simple REST application called The Quotes Database which will allow us to store and search as many quotes as we want.</p><h4><a href="https://www.digitalocean.com/community/tutorials/how-to-use-the-node-js-repl">How To Use the Node.js REPL</a></h4><p>The Node.js Read-Eval-Print-Loop (REPL) is an interactive shell that processes Node.js expressions. The shell reads JavaScript code the user enters, evaluates the result of interpreting the line of code, prints the result to the user, and loops until the user signals to quit.</p><p>The REPL is bundled with with every Node.js installation and allows you to quickly test and explore JavaScript code within the Node environment without having to store it in a file.</p><h4><a href="https://www.sitepoint.com/how-to-build-your-first-telegram-chatbot-with-node-js/">How to Build Your First Telegram Chatbot with Node.js</a></h4><p>In this guide, we’ll walk you through everything you need to know to build your first Telegram chatbot using JavaScript and Node.js.</p><h3>Great Video Content:</h3><h4><a href="https://www.youtube.com/watch?v=25GS0MLT8JU">JWT Authentication Node.js Tutorial with GraphQL and React</a></h4><p>Learn how to add JWT authentication to your project with this fullstack tutorial using Node.js, Typescript, GraphQL, React, and PostgreSQL.</p><h4><a href="https://www.youtube.com/watch?v=naZ8oEKuR44">Getting Started with Converting speech to text with Node.js</a></h4><p>This video walks you through how to get started with the Speech API for Node.js.</p><h4><a href="https://www.youtube.com/watch?v=ZX3qt0UWifc">Create A Paginated API With Node.js — Complete Tutorial</a></h4><p>First we will build out the most simple pagination set up which will get us started with pagination. After that we will implement a middleware to take care of pagination for use so we can paginate all of our endpoints easily. Lastly, we will connect out paginated API to a MongoDB database so we can have a fully functional paginated API with database storage.</p><h4><a href="https://www.youtube.com/watch?v=wPBjd-vb9eI">Why 0.1 + 0.2 === 0.30000000000000004: Implementing IEEE 754 in JS</a></h4><p>Floating point math is tricky. In this video, we’ll learn how these numbers work in computers, and build a software implementation from scratch in JavaScript.</p><h3>Like what you read?</h3><p>Share the post or just clap one, and come back next week! :) Thanks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hJcZ1yJ8WVyqgYQFAC9woA.png" /></figure><p><em>Originally published at </em><a href="https://community.risingstack.com/node-js-weekly-update-2019-38/"><em>community.risingstack.com</em></a><em> on September 20, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee23dedc429" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-node-js-collection/the-node-js-update-week-36-of-2019-20-september-ee23dedc429">The Node.js Update #Week 36 of 2019. 20 September</a> was originally published in <a href="https://medium.com/the-node-js-collection">Node.js Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>