<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Julián Duque</title>
    <description>The latest articles on DEV Community by Julián Duque (@julianduque).</description>
    <link>https://dev.to/julianduque</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F114208%2Fc106647c-4e2a-4653-af12-17043a009dc3.jpg</url>
      <title>DEV Community: Julián Duque</title>
      <link>https://dev.to/julianduque</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/julianduque"/>
    <language>en</language>
    <item>
      <title>Interested in IoT dev? Want early access to the Arduino Explore IoT kit? Tell us more...</title>
      <dc:creator>Julián Duque</dc:creator>
      <pubDate>Thu, 13 Aug 2020 19:04:30 +0000</pubDate>
      <link>https://dev.to/heroku/interested-in-iot-dev-want-a-jumpstart-with-the-new-arduino-explore-iot-soon-to-be-released-kit-tell-us-more-228a</link>
      <guid>https://dev.to/heroku/interested-in-iot-dev-want-a-jumpstart-with-the-new-arduino-explore-iot-soon-to-be-released-kit-tell-us-more-228a</guid>
      <description>&lt;p&gt;Hello DEV Community! 👋&lt;/p&gt;

&lt;p&gt;Heroku is partnering with &lt;a href="https://www.arduino.cc/" rel="noopener noreferrer"&gt;Arduino&lt;/a&gt; and &lt;a href="https://2020.cascadiajs.com/" rel="noopener noreferrer"&gt;CascadiaJS&lt;/a&gt; to deliver an IoT workshop next month during the &lt;em&gt;CascadiaJS Plugged In&lt;/em&gt; conference, and we are giving away &lt;em&gt;6 free tickets&lt;/em&gt; 🎟 and the opportunity to have access to one of the upcoming Explore IoT Kit from Arduino (a new product from Arduino, yet to be released!).&lt;/p&gt;

&lt;p&gt;The ticket includes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CascadiaJS Conference attendance&lt;/li&gt;
&lt;li&gt;A spot in the IoT Development Workshop facilitated by Arduino and Heroku&lt;/li&gt;
&lt;li&gt;An Explore IoT Kit from Arduino (not yet released!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to participate, here is what you need to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👉 Reply to this post as a comment with a creative idea and tell us: &lt;strong&gt;What would you build using the Explore IoT Kit from Arduino and Heroku?&lt;/strong&gt; 👈&lt;/li&gt;
&lt;li&gt;Make sure you include your Twitter handle (if any)&lt;/li&gt;
&lt;li&gt;Confirm you will attend the conference and share a write up with the community&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;top 6 ideas&lt;/strong&gt; with most votes (Hearts 💜) will be selected! 🎉&lt;/p&gt;

&lt;p&gt;You can submit your ideas between August 13th and August 21st, 2020, the top 6 ideas will be chosen on August 25th, 2020, and selected participants will be announced here and on &lt;a href="https://twitter.com/heroku" rel="noopener noreferrer"&gt;@Heroku&lt;/a&gt; and &lt;a href="https://twitter.com/cascadiajs" rel="noopener noreferrer"&gt;@CascadiaJS&lt;/a&gt; twitter accounts.&lt;/p&gt;

&lt;p&gt;If you are selected, we would love to see your idea come to reality! We want you to share with the community what you built and how you built it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Both conference and workshop are going to be remote, more information about the workshop can be found in the &lt;a href="https://2020.cascadiajs.com/workshop-iot" rel="noopener noreferrer"&gt;CascadiaJS 2020 website&lt;/a&gt;, the IoT Workshop will be hosted on September 2nd, 2020. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; Thank you very much for your submissions, definitely a lot of great ideas to implement!&lt;/p&gt;

&lt;p&gt;The time has come and we have selected the attendees for the IoT Workshop at CascadiaJS with Heroku and Arduino.&lt;/p&gt;

&lt;p&gt;Congratulations to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Matías Blayer&lt;/li&gt;
&lt;li&gt;Ricardo Trejos&lt;/li&gt;
&lt;li&gt;Diana Rodriguez (Super Diana)&lt;/li&gt;
&lt;li&gt;Javier Pedrosa&lt;/li&gt;
&lt;li&gt;Chris Bongers (DailyDevTips)&lt;/li&gt;
&lt;li&gt;Manuel Benitez (manwey)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you very much for your participation!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>iot</category>
      <category>arduino</category>
    </item>
    <item>
      <title>Let's Debug a Node.js Application</title>
      <dc:creator>Julián Duque</dc:creator>
      <pubDate>Mon, 03 Aug 2020 16:08:55 +0000</pubDate>
      <link>https://dev.to/heroku/let-s-debug-a-node-js-application-10cb</link>
      <guid>https://dev.to/heroku/let-s-debug-a-node-js-application-10cb</guid>
      <description>&lt;p&gt;There are always challenges when it comes to debugging applications. Node.js' asynchronous workflows add an extra layer of complexity to this arduous process. Although there have been some updates made to the V8 engine in order to easily access asynchronous stack traces, most of the time, we just get errors on the main thread of our applications, which makes debugging a little bit difficult. As well, when our Node.js applications crash, we usually need to &lt;a href="https://www.ibm.com/developerworks/library/wa-ibm-node-enterprise-dump-debug-sdk-nodejs-trs/index.html" rel="noopener noreferrer"&gt;rely on some complicated CLI tooling to analyze the core dumps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this article, we'll take a look at some easier ways to debug your Node.js applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logging
&lt;/h2&gt;

&lt;p&gt;Of course, no developer toolkit is complete without logging. We tend to place &lt;code&gt;console.log&lt;/code&gt; statements all over our code in local development, but this is not a really scalable strategy in production. You would likely need to do some filtering and cleanup, or implement a consistent logging strategy, in order to identify important information from genuine errors.&lt;/p&gt;

&lt;p&gt;Instead, to implement a proper log-oriented debugging strategy, use a logging tool like &lt;a href="https://github.com/pinojs/pino" rel="noopener noreferrer"&gt;Pino&lt;/a&gt; or &lt;a href="https://github.com/winstonjs/winston" rel="noopener noreferrer"&gt;Winston&lt;/a&gt;. These will allow you to set log levels (&lt;code&gt;INFO&lt;/code&gt;, &lt;code&gt;WARN&lt;/code&gt;, &lt;code&gt;ERROR&lt;/code&gt;), allowing you to print verbose log messages locally and only severe ones for production. You can also stream these logs to aggregators, or other endpoints, like LogStash, Papertrail, or even Slack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working with Node Inspect and Chrome DevTools
&lt;/h2&gt;

&lt;p&gt;Logging can only take us so far in understanding why an application is not working the way we would expect. For sophisticated debugging sessions, we will want to use breakpoints to inspect how our code behaves at the moment it is being executed.&lt;/p&gt;

&lt;p&gt;To do this, we can use Node Inspect. Node Inspect is a debugging tool which comes with Node.js. It's actually just an implementation of &lt;a href="https://developers.google.com/web/tools/chrome-devtools/" rel="noopener noreferrer"&gt;Chrome DevTools&lt;/a&gt; for your program, letting you add breakpoints, control step-by-step execution, view variables, and follow the call stack.&lt;/p&gt;

&lt;p&gt;There are a couple of ways to launch Node Inspect, but the easiest is perhaps to just call your Node.js application with the &lt;code&gt;--inspect-brk&lt;/code&gt; flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ node --inspect-brk $your_script_name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwc72qz7kay916qbqumz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwc72qz7kay916qbqumz.png" alt="Node inspector" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After launching your program, head to the &lt;code&gt;chrome://inspect&lt;/code&gt; URL in your Chrome browser to get to the Chrome DevTools. With Chrome DevTools, you have all of the capabilities you'd normally expect when debugging JavaScript in the browser. One of the nicer tools is &lt;a href="https://developers.google.com/web/tools/chrome-devtools/memory-problems" rel="noopener noreferrer"&gt;the ability to inspect memory&lt;/a&gt;. You can &lt;a href="https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots" rel="noopener noreferrer"&gt;take heap snapshots&lt;/a&gt; and profile memory usage to understand how memory is being allocated, and potentially, plug any memory leaks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using a supported IDE
&lt;/h3&gt;

&lt;p&gt;Rather than launching your program in a certain way, many modern IDEs also support debugging Node applications. In addition to having many of the features found in Chrome DevTools, they bring their own features, such as &lt;a href="https://code.visualstudio.com/blogs/2018/07/12/introducing-logpoints-and-auto-attach" rel="noopener noreferrer"&gt;creating logpoints&lt;/a&gt; and allowing you to create multiple debugging profiles. Check out &lt;a href="https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients" rel="noopener noreferrer"&gt;the Node.js' guide on inspector clients&lt;/a&gt; for more information on these IDEs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using NDB
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjld3chnigtbma6i0mg8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjld3chnigtbma6i0mg8z.png" alt="NDB" width="800" height="879"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another option is to install &lt;a href="https://github.com/GoogleChromeLabs/ndb" rel="noopener noreferrer"&gt;ndb&lt;/a&gt;, a standalone debugger for Node.js. It makes use of the same DevTools that are available in the browser, just as an isolated, local debugger. It also has some extra features that aren't available in DevTools. It supports edit-in-place, which means you can make changes to your code and have the updated logic supported directly by the debugger platform. This is very useful for doing quick iterations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Post-Mortem Debugging
&lt;/h2&gt;

&lt;p&gt;Suppose your application crashes due to a catastrophic error, like a memory access error. These may be rare, but they do happen, particularly if your app relies on native code.&lt;/p&gt;

&lt;p&gt;To investigate these sorts of issues, you can use &lt;a href="https://github.com/nodejs/llnode" rel="noopener noreferrer"&gt;llnode&lt;/a&gt;. When your program crashes, &lt;code&gt;llnode&lt;/code&gt; can be used to inspect JavaScript stack frames and objects by mapping them to objects on the C/C++ side. In order to use it, you first need a core dump of your program. To do this, you will need to use &lt;code&gt;process.abort&lt;/code&gt; instead of &lt;code&gt;process.exit&lt;/code&gt; to shut down processes in your code. When you use &lt;code&gt;process.abort&lt;/code&gt;, the Node process generates a core dump file on exit.&lt;/p&gt;

&lt;p&gt;To better understand what &lt;code&gt;llnode&lt;/code&gt; can provide, &lt;a href="https://asciinema.org/a/29589" rel="noopener noreferrer"&gt;here is a video&lt;/a&gt; which demonstrates some of its capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful Node Modules
&lt;/h2&gt;

&lt;p&gt;Aside from all of the above, there are also a few third-party packages that we can recommend for further debugging.&lt;/p&gt;

&lt;h3&gt;
  
  
  debug
&lt;/h3&gt;

&lt;p&gt;The first of these is called, simply enough, &lt;a href="https://www.npmjs.com/package/debug" rel="noopener noreferrer"&gt;debug&lt;/a&gt;. With debug, you can assign a specific namespace to your log messages, based on a function name or an entire module. You can then selectively choose which messages are printed to the console via a specific environment variable.&lt;/p&gt;

&lt;p&gt;For example, here's a Node.js server which is logging several messages from the entire application and middleware stack, like &lt;code&gt;sequelize&lt;/code&gt;, &lt;code&gt;express:application&lt;/code&gt;, and &lt;code&gt;express:router&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F064gkuaxt5g8fp0l2tpf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F064gkuaxt5g8fp0l2tpf.png" alt="Debug module full output" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we set the &lt;code&gt;DEBUG&lt;/code&gt; environment variable to &lt;code&gt;express:router&lt;/code&gt; and start the same program, only the messages tagged as &lt;code&gt;express:router&lt;/code&gt; are shown:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6vbsz2rmzxsbbbhaxi4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy6vbsz2rmzxsbbbhaxi4.png" alt="Debug module filtered output" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By filtering messages in this way, we can hone in on how a single segment of the application is behaving, without needing to drastically change the logging of the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  trace and clarify
&lt;/h3&gt;

&lt;p&gt;Two more modules that go together are &lt;a href="https://github.com/AndreasMadsen/trace" rel="noopener noreferrer"&gt;trace&lt;/a&gt; and &lt;a href="https://github.com/AndreasMadsen/clarify" rel="noopener noreferrer"&gt;clarify&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;trace&lt;/code&gt; augments your asynchronous stack traces by providing much more detailed information on the async methods that are being called, a roadmap which Node.js does not provide by default. &lt;code&gt;clarify&lt;/code&gt; helps by removing all of the information from stack traces which are specific to Node.js internals. This allows you to concentrate on the function calls that are just specific to your application.&lt;/p&gt;

&lt;p&gt;Neither of these modules are recommended for running in production! You should only enable them when debugging issues in your local development environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find out more
&lt;/h2&gt;

&lt;p&gt;If you'd like to follow along with how to use these debugging tools in practice, &lt;a href="https://vimeo.com/428003519/f132859d08" rel="noopener noreferrer"&gt;here is a video recording&lt;/a&gt; which provides more detail. It includes some live demos of how to narrow in on problems in your code. Or, if you have any other questions, you can find me on Twitter &lt;a href="https://twitter.com/julian_duque" rel="noopener noreferrer"&gt;@julian_duque&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>productivity</category>
      <category>npm</category>
    </item>
    <item>
      <title>Deploying Node.js microservices to ZEIT Now</title>
      <dc:creator>Julián Duque</dc:creator>
      <pubDate>Thu, 04 Apr 2019 21:08:55 +0000</pubDate>
      <link>https://dev.to/julianduque/deploying-node-js-microservices-to-zeit-now-54j7</link>
      <guid>https://dev.to/julianduque/deploying-node-js-microservices-to-zeit-now-54j7</guid>
      <description>&lt;p&gt;&lt;a href="https://zeit.co/now" rel="noopener noreferrer"&gt;ZEIT Now&lt;/a&gt; is a cloud platform to deploy serverless applications, one of the things I like the most about Now is their DX (Developer Experience), it makes it very pleasant to deploy microservices to the cloud.&lt;/p&gt;

&lt;p&gt;In this article we are going to learn how to install Now and start deploying with one single command, &lt;code&gt;now&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js 10 LTS Installed&lt;/li&gt;
&lt;li&gt;A terminal&lt;/li&gt;
&lt;li&gt;Code editor of your choice&lt;/li&gt;
&lt;li&gt;A ZEIT Now account, you can signup for free &lt;a href="https://zeit.co/signup" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;First, let's install &lt;code&gt;now&lt;/code&gt; CLI from &lt;code&gt;npm&lt;/code&gt; by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Login
&lt;/h2&gt;

&lt;p&gt;Next, we need to identify ourselves in the platform, &lt;code&gt;now&lt;/code&gt; CLI offers an easy way to do this by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;now login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will ask for your email and will send you a Verification email, just by clicking on Verify will log you in the platform, it's like magic 🔮!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2u0jg9muyykikoqntjyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2u0jg9muyykikoqntjyi.png" alt="Verifying Email" width="800" height="695"&gt;&lt;/a&gt;&lt;/p&gt;
Verifying email



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb793eagyk1lrs499h052.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb793eagyk1lrs499h052.png" alt="Successful login from Terminal" width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;
Successful login from Terminal



&lt;h2&gt;
  
  
  Create your first Microservice
&lt;/h2&gt;

&lt;p&gt;We are ready to start creating our first &lt;code&gt;microservice&lt;/code&gt; (or serverless application, you name it).&lt;/p&gt;

&lt;p&gt;Now provides a list of &lt;a href="https://zeit.co/examples/" rel="noopener noreferrer"&gt;examples&lt;/a&gt;, for our exercise we are going to use Node.js ⬢, but hey!, Now supports other languages and platforms too, just give it a try with the one you like the most 😉&lt;/p&gt;

&lt;p&gt;To start witht he Node.js template let's run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;now init nodejs microservice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a folder called &lt;code&gt;microservice&lt;/code&gt; with the Node.js template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now&lt;/strong&gt; is time to deploy our example to the cloud, let's go to that folder and execute &lt;code&gt;now&lt;/code&gt; to see what happens!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;microservice
&lt;span class="nv"&gt;$ &lt;/span&gt;now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhavof2ynwi5fpjjucl4t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhavof2ynwi5fpjjucl4t.png" alt="Deploying to Now" width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;
Deploying to Now and running our microservice



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7nd3nc5e911gmanvrb.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7nd3nc5e911gmanvrb.gif" alt="It's magic" width="400" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before continuing with our next trick, let's explore the files we are deploying:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;index.js&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;It contains a simple function with the &lt;code&gt;request&lt;/code&gt; and &lt;code&gt;response&lt;/code&gt; objects from Node.js, this will be executed on every request made to our microservice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Hello from Node.js on Now 2.0!`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
index.js





&lt;h3&gt;
  
  
  &lt;code&gt;now.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;It's the &lt;a href="https://zeit.co/docs/v2/deployments/configuration/" rel="noopener noreferrer"&gt;deployment configuration&lt;/a&gt; file, used to specify the name of our project, the type of builders we are going to use, routes, etc. More information can be found in their &lt;a href="https://zeit.co/docs/v2/deployments/basics/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nodejs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"builds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@now/node"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
now.json





&lt;h2&gt;
  
  
  Monorepo
&lt;/h2&gt;

&lt;p&gt;What we have seen so far seems simple, but, here comes the real power of &lt;code&gt;now&lt;/code&gt;, we can mix and match different microservices in a &lt;a href="https://en.wikipedia.org/wiki/Monorepo" rel="noopener noreferrer"&gt;&lt;code&gt;monorepo&lt;/code&gt;&lt;/a&gt; to create a full serverless project.&lt;/p&gt;

&lt;p&gt;For our next trick, we will create a &lt;a href="https://nuxtjs.org/" rel="noopener noreferrer"&gt;Nuxt.js&lt;/a&gt; static application that will be doing API requests to a Node.js microservice, both are going to be deployed to &lt;code&gt;now&lt;/code&gt; using the &lt;code&gt;monorepo&lt;/code&gt; approach.&lt;/p&gt;

&lt;p&gt;Let's create a &lt;code&gt;monorepo&lt;/code&gt; folder and then run &lt;code&gt;create-nuxt-app&lt;/code&gt;, this will create a basic Nuxt.js application for you, just make sure to select &lt;code&gt;Axios&lt;/code&gt; support in the features section, we will use it later 😉.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;monorepo
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;monorepo
&lt;span class="nv"&gt;$ &lt;/span&gt;npx create-nuxt-app www
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpuu2whqg5jjov5k8seo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpuu2whqg5jjov5k8seo.png" alt="create-nuxt-app" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;
create-nuxt-app



&lt;p&gt;We have our frontend application almost ready, we will need to add an API to our &lt;code&gt;monorepo&lt;/code&gt; project, let's create an &lt;code&gt;api&lt;/code&gt; folder and add a Node.js &lt;code&gt;microservice&lt;/code&gt; in there (no need to create the &lt;code&gt;now.json&lt;/code&gt;, we will take care of that later).&lt;/p&gt;

&lt;p&gt;Let's create a &lt;code&gt;bands&lt;/code&gt; microservice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;api
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;api/bands.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;api/bands.js&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bands&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Dio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Heavy Metal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Anthrax&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Trash Metal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tenebrarum&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Gothic Metal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bands&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;yes, I like Metal 🤘&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's create a Deployment Configuration file to wire up our two project in the monorepo.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;now.json&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"monorepo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"builds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"www/package.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@now/static-build"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"api/*.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@now/node"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/(.*)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"dest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/$1"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/(.*)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"dest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/www/$1"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;More information about how routes work in their &lt;a href="https://zeit.co/docs/v2/deployments/routes/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here we are creating both the API and the Web project in one single repo using two different serverless applications, one served by &lt;code&gt;@now/node&lt;/code&gt; and the other built by &lt;code&gt;@now/static-build&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Before deploying let's add the following to our &lt;code&gt;www&lt;/code&gt; project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a &lt;code&gt;now-build&lt;/code&gt; script to the &lt;code&gt;package.json&lt;/code&gt; file as following:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"now-build": "API_URL=https://monorepo.julianduque.now.sh npm run generate"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will setup &lt;code&gt;Axios&lt;/code&gt; to discover our API endpoint in the proper URL (make sure to use your alias here), and will tell &lt;code&gt;now&lt;/code&gt; how to generate a static site for Nuxt.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let's update our &lt;code&gt;pages/index.vue&lt;/code&gt; page to execute the Bands microservice we implemented with Node.js
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Logo&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;bands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;loadBands &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bands&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;$get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/bands.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add a Button to the &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; and render the items with Vue.js
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight vue"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;v-on:click=&lt;/span&gt;&lt;span class="s"&gt;"loadBands"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Load Bands&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;v-bind:key=&lt;/span&gt;&lt;span class="s"&gt;"band.name"&lt;/span&gt; &lt;span class="na"&gt;v-for=&lt;/span&gt;&lt;span class="s"&gt;"band in bands"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;{{ band.name }} - {{ band.genre }}&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And voila! We have connected our two serverless applications in one monorepo with Now!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyehk0db6cf971lexj12j.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyehk0db6cf971lexj12j.gif" alt="Mind Blown" width="512" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you liked this tutorial and if you speak Spanish let me invite you to my semi-weekly Node.js show on &lt;a href="https://twitch.tv/julianduque" rel="noopener noreferrer"&gt;Twitch&lt;/a&gt; - &lt;a href="https://www.youtube.com/user/julianduquej" rel="noopener noreferrer"&gt;Node.js ¡En Vivo!&lt;/a&gt; 💜&lt;/p&gt;

</description>
      <category>node</category>
      <category>microservices</category>
      <category>zeit</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
