<?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: Bruno Bonnin</title>
    <description>The latest articles on DEV Community by Bruno Bonnin (@bbonnin).</description>
    <link>https://dev.to/bbonnin</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%2F192952%2F8429468d-46bb-4031-833b-713505795efa.jpeg</url>
      <title>DEV Community: Bruno Bonnin</title>
      <link>https://dev.to/bbonnin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bbonnin"/>
    <language>en</language>
    <item>
      <title>pulsar-express, a web interface for Apache Pulsar</title>
      <dc:creator>Bruno Bonnin</dc:creator>
      <pubDate>Fri, 17 Jan 2020 10:27:40 +0000</pubDate>
      <link>https://dev.to/bbonnin/pulsar-express-a-web-interface-for-apache-pulsar-1lm</link>
      <guid>https://dev.to/bbonnin/pulsar-express-a-web-interface-for-apache-pulsar-1lm</guid>
      <description>&lt;p&gt;In this article, I am going to present you one of my side project: &lt;a href="https://github.com/bbonnin/pulsar-express" rel="noopener noreferrer"&gt;pulsar-express&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Pulsar-express aims to be a simple web application that allow the users to see informations about their &lt;a href="https://pulsar.apache.org/" rel="noopener noreferrer"&gt;Apache Pulsar&lt;/a&gt; clusters.&lt;/p&gt;

&lt;p&gt;My initial goal was to provide something very simple (too much, maybe), easy to install, configure and run, and this article will show you these steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install and run it
&lt;/h2&gt;

&lt;p&gt;There are several ways to use &lt;code&gt;pulsar-express&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By cloning the projet and running it locally (see &lt;code&gt;Development&lt;/code&gt; section)&lt;/li&gt;
&lt;li&gt;By running a docker image: &lt;code&gt;docker run -it -p 3000:3000 bbonnin/pulsar-express&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;You can set a connection url in the command: &lt;code&gt;docker run -it -p 3000:3000 -e PE_CONNECTION_URL=http://host.docker.internal:8080 bbonnin/pulsar-express&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Important: the calls to the Pulsar API are done on server side (i.e. from the container), so your Pulsar must be reachable from the container (do not use localhost :)). A solution: you can add &lt;code&gt;--network=host&lt;/code&gt; to the command line (but, it's only working on Linux...)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;By installing it using &lt;code&gt;npm&lt;/code&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install it globally&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;pulsar-express &lt;span class="nt"&gt;-g&lt;/span&gt;

&lt;span class="c"&gt;# Start it&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;pulsar-express

        ╭────────────────╮
        │ PULSAR EXPRESS │
        ╰────────────────╯

        &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; Open http://localhost:3000


&lt;span class="c"&gt;# Start it on a specific port&lt;/span&gt;
&lt;span class="nv"&gt;$ PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8000 pulsar-express

        ╭────────────────╮
        │ PULSAR EXPRESS │
        ╰────────────────╯

        &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; Open http://localhost:8000

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

&lt;/div&gt;



&lt;p&gt;If you want to configure connections (to be available to all users), you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a json file with the connections:
&lt;/li&gt;
&lt;/ul&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="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;"test cluster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
     &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://test-cluster-host:8080"&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;"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;"integration cluster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
     &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://int-cluster-host:8080"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
     &lt;/span&gt;&lt;span class="nl"&gt;"token"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;YOUR_TOKEN&amp;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;"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;"prod cluster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
     &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://prod-cluster-host:8080"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
     &lt;/span&gt;&lt;span class="nl"&gt;"fctWorkerUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://prod-fct-worker-cluster-host:6750"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"token"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;YOUR_TOKEN&amp;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;ul&gt;
&lt;li&gt;and set the env variable &lt;code&gt;PE_CONFIG_FILE&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PE_CONFIG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/path/to/my/config.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Or you can also set a connection URL
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PE_CONNECTION_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://pulsar-host:8080

&lt;span class="c"&gt;# Without a name, the url will be used (hostname:port),&lt;/span&gt;
&lt;span class="c"&gt;# Or you can set a name:&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PE_CONNECTION_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-pulsar

&lt;span class="c"&gt;# A token if needed:&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PE_CONNECTION_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;YOUR_TOKEN&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;For a detailed explication about the security configuration, checkout the &lt;a href="https://github.com/bbonnin/pulsar-express" rel="noopener noreferrer"&gt;README of the project&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;From there, you can connect with your browser to the url above !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbat9r9ybqcyhisay0qzp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbat9r9ybqcyhisay0qzp.png" alt="Pulsar express home"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;If you haven't defined a connection at startup, the first step is to go the &lt;code&gt;Connections&lt;/code&gt; page and add a new connection. These connections are stored on client side (localstorage of your browser)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fumql9q4b7wjlkecnq6n9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fumql9q4b7wjlkecnq6n9.png" alt="Pulsar express connections"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;In this page, you can see some basic informations about your clusters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fijz6kyn3x4jesiccbgak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fijz6kyn3x4jesiccbgak.png" alt="Pulsar express overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Clusters
&lt;/h3&gt;

&lt;p&gt;Informations about the clusters (URL, ...). You can update some informations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3ooub2h640luns6x3yu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3ooub2h640luns6x3yu7.png" alt="Pulsar express clusters"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tenants
&lt;/h3&gt;

&lt;p&gt;Informations about the tenants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp2rg4qjgddciqqu2ntkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp2rg4qjgddciqqu2ntkr.png" alt="Pulsar express tenants"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this page, you can also create a tenant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Namespaces
&lt;/h3&gt;

&lt;p&gt;Informations about the namespaces:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9pq471i49ca0an966jeh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9pq471i49ca0an966jeh.png" alt="Pulsar express namespaces"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this page, you can also create a namespace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics
&lt;/h3&gt;

&lt;p&gt;Informations about the topics:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzif8qg5y83pqgrta0xsr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzif8qg5y83pqgrta0xsr.png" alt="Pulsar express topics"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this page, you can also create a topic.&lt;/p&gt;

&lt;p&gt;Details about a topic:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fo72k2dw5xa9bjrnyn7cz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fo72k2dw5xa9bjrnyn7cz.png" alt="Pulsar express topics"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;p&gt;Informations about the functions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ft4qq7uqzivtaqwen2uzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ft4qq7uqzivtaqwen2uzw.png" alt="Pulsar express functions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Details about a function:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4cur9hvd86adzpppjejg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4cur9hvd86adzpppjejg.png" alt="Pulsar express function"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;

&lt;p&gt;The repository of the app is: &lt;a href="https://github.com/bbonnin/pulsar-express" rel="noopener noreferrer"&gt;https://github.com/bbonnin/pulsar-express&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This app has been developed with &lt;a href="https://nuxtjs.org" rel="noopener noreferrer"&gt;Nuxt.js&lt;/a&gt;.&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="c"&gt;# install dependencies&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# serve with hot reload at localhost:3000&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm run dev

&lt;span class="c"&gt;# build for production and launch server&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm run build
&lt;span class="nv"&gt;$ &lt;/span&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For detailed explanation on how things work, checkout &lt;a href="https://nuxtjs.org" rel="noopener noreferrer"&gt;Nuxt.js docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For Docker:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build: &lt;code&gt;npm run docker-build&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Test locally: &lt;code&gt;npm run docker-run&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Tag: &lt;code&gt;docker tag pulsar-express USER/pulsar-express:VERSION&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Publish: &lt;code&gt;docker push USER/pulsar-express:VERSION&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There is still a lot to be done to get a fully functional application.&lt;br&gt;
If you are interested in the project, feel free to participate in the development of the application.&lt;/p&gt;

&lt;p&gt;Cover photo by &lt;a href="https://unsplash.com/@thevantagepoint718" rel="noopener noreferrer"&gt;Lerone Pieters&lt;/a&gt; on Unsplash&lt;/p&gt;

</description>
      <category>apache</category>
      <category>pulsar</category>
      <category>web</category>
      <category>interface</category>
    </item>
    <item>
      <title>Building a simple app with Nuxt and Morris for displaying charts</title>
      <dc:creator>Bruno Bonnin</dc:creator>
      <pubDate>Fri, 06 Sep 2019 14:44:55 +0000</pubDate>
      <link>https://dev.to/bbonnin/building-a-simple-app-with-nuxt-and-morris-for-displaying-charts-1a8</link>
      <guid>https://dev.to/bbonnin/building-a-simple-app-with-nuxt-and-morris-for-displaying-charts-1a8</guid>
      <description>&lt;p&gt;&lt;em&gt;This post was originally posted on &lt;a href="https://medium.com/@brunobonnin/building-a-simple-app-with-nuxt-and-morris-js-for-displaying-chart-b6b33b14ffff" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The article aims to describe (very shortly) how to create an application that will display a chart for data coming from an API.&lt;/p&gt;

&lt;h1&gt;
  
  
  First step, create the app with Nuxt
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://nuxtjs.org/" rel="noopener noreferrer"&gt;Nuxt&lt;/a&gt; is one of my favourite framework at the moment: if you are familiar with &lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue.js&lt;/a&gt;, building an application with Nuxt is the next step to a simpler and more beautiful world 😀&lt;br&gt;
So, let’s start by creating the application with the command &lt;code&gt;npx create-nuxt-app&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npx create-nuxt-app
npx : 379 installé(s) en 16.616s

&amp;gt; Generating Nuxt.js project in /Dev/world-bank-data
? Project name: world-bank-data
? Project description: A wonderful app with Nuxt and Morris
? Use a custom server framework: none
? Choose features to install: Axios
? Use a custom UI framework: none
? Use a custom test framework: none
? Choose rendering mode: Single Page App
? Author name: Bruno
? Choose a package manager: npm


  To get started:

        npm run dev

  To build &amp;amp; start for production:

        npm run build
        npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: select &lt;code&gt;axios&lt;/code&gt; as a feature to install and choose &lt;code&gt;Single Page App&lt;/code&gt; for the rendering mode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, you can start your application with &lt;code&gt;npm run dev&lt;/code&gt; and open &lt;code&gt;http://localhost:3000&lt;/code&gt;. You should get something like that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Febrxw45piltovu2718j2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Febrxw45piltovu2718j2.png" alt="Welcome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Next step, add dependencies, plugins, etc
&lt;/h1&gt;

&lt;p&gt;We need two other dependencies for our application:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vue-lodash&lt;/code&gt; : a &lt;a href="https://github.com/Ewocker/vue-lodash" rel="noopener noreferrer"&gt;library&lt;/a&gt; that provides utility functions (will be used to parse the result of the API&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vue-morris&lt;/code&gt; : a &lt;a href="https://github.com/bbonnin/vue-morris" rel="noopener noreferrer"&gt;wrapper of Morris.js&lt;/a&gt; for Vue.js (it is a little bit old, but very efficient)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s add these required dependencies :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i vue-lodash vue-morris --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a simpler use of certain dependencies, Nuxt can be enriched with plugins. Let’s do it with vue-lodash and vue-morris.&lt;/p&gt;

&lt;p&gt;Create two files: &lt;code&gt;plugins/vue-lodash.js&lt;/code&gt; and &lt;code&gt;plugins/vue-morris.js&lt;/code&gt; and update &lt;code&gt;nuxt.config.js&lt;/code&gt; to declare these plugins.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nuxt.config.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="cm"&gt;/*
  ** Plugins to load before mounting the App
  */&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;~/plugins/vue-lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;~/plugins/vue-morris&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;vue-lodash.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;import&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;VueLodash&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// To be able to use this._ or Vue._ in the components without including lodash&lt;/span&gt;
&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VueLodash&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;vue-morris.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;import&lt;/span&gt; &lt;span class="nx"&gt;Raphael&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;raphael/raphael&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;jQuery&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jquery&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// This is needed by Morris&lt;/span&gt;
&lt;span class="nb"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Raphael&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Raphael&lt;/span&gt;
&lt;span class="nb"&gt;global&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;jQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jQuery&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Final step, add a new page with the chart
&lt;/h1&gt;

&lt;p&gt;Now, we are going to create a page to display the 10 most populous countries in a bar chart.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The service used for this example is the &lt;a href="https://data.worldbank.org/" rel="noopener noreferrer"&gt;API of the World Bank&lt;/a&gt;. They provide a lot of data, very interesting ! For more information about the API, check &lt;a href="https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation" rel="noopener noreferrer"&gt;this page&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In our example, we use this URL: &lt;code&gt;http://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL?date=2018&amp;amp;format=json&amp;amp;per_page=300&amp;amp;mrv=1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;SP.POP.TOTL&lt;/em&gt;: name of the indicator (in our case, the population)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;date&lt;/em&gt;: range of date (I just set the last year, I don’t want historical data)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;format&lt;/em&gt;: format of the result (it can be XML, JSON, …)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;per_page&lt;/em&gt;: number of result for each query (I set it to 300 to get all the results in a single query, no paging)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;mrv&lt;/em&gt;: fetches most recent values based on the number specified (I set it to 1, to get only the last recent value)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To query this API and get the most populous countries, the code will look like (in this method, we filter the values, sort according to the &lt;code&gt;value&lt;/code&gt; field and keep only 10 values):&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="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;http://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL?date=2018&amp;amp;format=json&amp;amp;per_page=300&amp;amp;mrv=1&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="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;countries&lt;/span&gt; &lt;span class="o"&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;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;countryiso3code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sortBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;value&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="nf"&gt;value&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reverse&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;Let’s add a new file: &lt;code&gt;pages/population.vue&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; part: we import &lt;code&gt;BarChart&lt;/code&gt; from &lt;code&gt;vue-morris&lt;/code&gt; and add a &lt;code&gt;mounted&lt;/code&gt; function that invoke the API (see above)&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; part: we use the &lt;code&gt;bar-chart&lt;/code&gt; tag for displaying the result of the call to the API.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;The 10 most populous countries&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;bar-chart&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"bar"&lt;/span&gt; 
      &lt;span class="na"&gt;:data=&lt;/span&gt;&lt;span class="s"&gt;"countries"&lt;/span&gt; 
      &lt;span class="na"&gt;xkey=&lt;/span&gt;&lt;span class="s"&gt;"countryiso3code"&lt;/span&gt; 
      &lt;span class="na"&gt;ykeys=&lt;/span&gt;&lt;span class="s"&gt;'["value"]'&lt;/span&gt; 
      &lt;span class="na"&gt;labels=&lt;/span&gt;&lt;span class="s"&gt;'["Pop."]'&lt;/span&gt;
      &lt;span class="na"&gt;resize=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; 
      &lt;span class="na"&gt;bar-colors=&lt;/span&gt;&lt;span class="s"&gt;'[ "#36A2EB" ]'&lt;/span&gt;
      &lt;span class="na"&gt;grid=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; 
      &lt;span class="na"&gt;grid-text-weight=&lt;/span&gt;&lt;span class="s"&gt;"bold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/bar-chart&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BarChart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue-morris&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&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;BarChart&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;data&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;countries&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="nf"&gt;mounted&lt;/span&gt;&lt;span class="p"&gt;()&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;$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;http://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL?date=2018&amp;amp;format=json&amp;amp;per_page=300&amp;amp;mrv=1&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="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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;countries&lt;/span&gt; &lt;span class="o"&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;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;countryiso3code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sortBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;value&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="nf"&gt;value&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reverse&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if you open the URL &lt;code&gt;http://localhost:3000/population&lt;/code&gt;, you should see something like that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyk32renxni8zc1nzq7ga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fyk32renxni8zc1nzq7ga.png" alt="Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we are going to create a link to navigate from the home page to the population page: update the file &lt;code&gt;pages/index.vue&lt;/code&gt;, replace the two buttons by a &lt;code&gt;&amp;lt;nuxt-link&amp;gt;&lt;/code&gt; (you can also remove the logo).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  ...
  &lt;span class="nt"&gt;&amp;lt;nuxt-link&lt;/span&gt; &lt;span class="na"&gt;to=&lt;/span&gt;&lt;span class="s"&gt;"/population"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button--grey"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;World population&lt;span class="nt"&gt;&amp;lt;/nuxt-link&amp;gt;&lt;/span&gt;
  ...
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;As you can see, it’s very easy to create an application with Nuxt and add a simple chart framework to get rich and interactive pages.&lt;br&gt;
The source code is available on github: &lt;a href="https://github.com/bbonnin/medium-nuxt-morris" rel="noopener noreferrer"&gt;https://github.com/bbonnin/medium-nuxt-morris&lt;/a&gt;. Enjoy !&lt;/p&gt;

&lt;p&gt;Cover image by &lt;a href="https://unsplash.com/@firmbee" rel="noopener noreferrer"&gt;William Iven&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>nuxt</category>
      <category>javascript</category>
      <category>charts</category>
    </item>
  </channel>
</rss>
