<?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: Thomas</title>
    <description>The latest articles on DEV Community by Thomas (@thomas_ph35).</description>
    <link>https://dev.to/thomas_ph35</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%2F98251%2F7e98880b-f404-4df4-9a20-e3c697726c45.png</url>
      <title>DEV Community: Thomas</title>
      <link>https://dev.to/thomas_ph35</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thomas_ph35"/>
    <language>en</language>
    <item>
      <title>Migrate a Symfony app from heroku to Fly.io</title>
      <dc:creator>Thomas</dc:creator>
      <pubDate>Wed, 21 Dec 2022 15:24:34 +0000</pubDate>
      <link>https://dev.to/thomas_ph35/migrate-a-symfony-app-from-heroku-to-flyio-54p8</link>
      <guid>https://dev.to/thomas_ph35/migrate-a-symfony-app-from-heroku-to-flyio-54p8</guid>
      <description>&lt;p&gt;A few days ago I noticed that one of my side projects hosted on Heroku was not running anymore.&lt;/p&gt;

&lt;p&gt;The reason : No more free tier...&lt;/p&gt;

&lt;p&gt;It was time to find an alternative to host my app for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Fly ?
&lt;/h2&gt;

&lt;p&gt;There is not reason for that choice beside the fact that it manage to host my app for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Versions
&lt;/h2&gt;

&lt;p&gt;My app is a Symfony 5.3 API, running with PHP 7.4&lt;/p&gt;

&lt;h2&gt;
  
  
  Dockerfile
&lt;/h2&gt;

&lt;p&gt;Fly.io does have an integration for laravel but none for Symfony.&lt;br&gt;
I had to find/create a Dockerfile.&lt;/p&gt;

&lt;p&gt;I found some great ressources but none of them worked out of the box.&lt;/p&gt;

&lt;p&gt;looking at this repo helped me : &lt;a href="https://github.com/fly-apps/fly-hello-laravel/blob/main/Dockerfile" rel="noopener noreferrer"&gt;https://github.com/fly-apps/fly-hello-laravel/blob/main/Dockerfile&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my edited Dockerfile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; alpine:3.14&lt;/span&gt;

&lt;span class="k"&gt;LABEL&lt;/span&gt;&lt;span class="s"&gt; fly_launch_runtime="Symfony"&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;apk update

&lt;span class="c"&gt;# add useful utilities&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add curl &lt;span class="se"&gt;\
&lt;/span&gt;    zip &lt;span class="se"&gt;\
&lt;/span&gt;    unzip &lt;span class="se"&gt;\
&lt;/span&gt;    ssmtp &lt;span class="se"&gt;\
&lt;/span&gt;    tzdata &lt;span class="se"&gt;\
&lt;/span&gt;    openssl

&lt;span class="c"&gt;# php, with assorted extensions we likely need&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add &lt;span class="nt"&gt;--no-cache&lt;/span&gt; &lt;span class="nt"&gt;--repository&lt;/span&gt; http://dl-cdn.alpinelinux.org/alpine/edge/community/ &lt;span class="nt"&gt;--allow-untrusted&lt;/span&gt; gnu-libiconv &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apk add &lt;span class="nt"&gt;-U&lt;/span&gt; &lt;span class="nt"&gt;--no-cache&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="c"&gt;# Packages&lt;/span&gt;
    tini \
    php7 \
    php7-amqp \
    php7-dev \
    php7-common \
    php7-apcu \
    php7-gd \
    php7-xmlreader \
    php7-bcmath \
    php7-ctype \
    php7-curl \
    php7-exif \
    php7-iconv \
    php7-intl \
    php7-json \
    php7-mbstring \
    php7-opcache \
    php7-openssl \
    php7-pcntl \
    php7-pdo \
    php7-mysqlnd \
    php7-pdo_mysql \
    php7-pdo_pgsql \
    php7-phar \
    php7-posix \
    php7-session \
    php7-xml \
    php7-xsl \
    php7-zip \
    php7-zlib \
    php7-dom \
    php7-redis \
    php7-fpm \
    php7-sodium \
    php7-tokenizer

&lt;span class="c"&gt;# supervisor, to support running multiple processes in a single app&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add supervisor

&lt;span class="c"&gt;# nginx (https://wiki.alpinelinux.org/wiki/Nginx)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add nginx
&lt;span class="c"&gt;# ... with custom conf&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; /etc/nginx/nginx.conf /etc/nginx/nginx.old.conf &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /etc/nginx/http.d/default.conf

&lt;span class="c"&gt;# htop, which is useful if need to SSH in to the vm&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apk add htop

&lt;span class="c"&gt;# composer, to install Laravel's dependencies&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;curl &lt;span class="nt"&gt;-sS&lt;/span&gt; https://getcomposer.org/installer | php &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--install-dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/bin &lt;span class="nt"&gt;--filename&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;composer

&lt;span class="c"&gt;# add users (see https://www.getpagespeed.com/server-setup/nginx-and-php-fpm-what-my-permissions-should-be)&lt;/span&gt;
&lt;span class="c"&gt;# 1. a user for the app and php-fpm to interact with it (execute)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;adduser &lt;span class="nt"&gt;-D&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; 1000 &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s1"&gt;'app'&lt;/span&gt; app
&lt;span class="c"&gt;# 2. a user for nginx is not needed because already have one&lt;/span&gt;
&lt;span class="c"&gt;# ... and add the nginx user TO the app group else it won't have permission to access web files (as can see in /var/log/nginx/error.log)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;addgroup nginx app

&lt;span class="c"&gt;# use a socket not port for php-fpm so php-fpm needs permission to write to thay folder (make sure the same .sock is in nginx.conf and in php-fpm's app.conf)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; /var/run/php &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; app:app /var/run/php

&lt;span class="c"&gt;# working directory&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; /var/www/html
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /var/www/html&lt;/span&gt;

&lt;span class="c"&gt;# copy app code across, skipping files based on .dockerignore&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . /var/www/html&lt;/span&gt;
&lt;span class="c"&gt;# ... install Laravel dependencies&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;composer &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;span class="c"&gt;# ... and make all files owned by app, including the just added /vendor&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; app:app /var/www/html

&lt;span class="c"&gt;# move the docker-related conf files out of the app folder to where on the vm they need to be&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /etc/php7/php-fpm.conf
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /etc/php7/php-fpm.d/www.conf
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;docker/supervisor.conf /etc/supervisord.conf
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;docker/nginx.conf /etc/nginx/nginx.conf
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;docker/php.ini /etc/php7/conf.d/php.ini
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;docker/php-fpm.conf /etc/php7/php-fpm.conf
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;docker/app.conf /etc/php7/php-fpm.d/app.conf

&lt;span class="c"&gt;# make sure can execute php files (since php-fpm runs as app, it needs permission e.g for /storage/framework/views for caching views)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; 755 /var/www/html

&lt;span class="c"&gt;# the same port nginx.conf is set to listen on and fly.toml references (standard is 8080)&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 8080&lt;/span&gt;

&lt;span class="c"&gt;# off we go (since no docker-compose, keep both nginx and php-fpm running in the same container by using supervisor) ...&lt;/span&gt;
&lt;span class="k"&gt;ENTRYPOINT&lt;/span&gt;&lt;span class="s"&gt; ["supervisord", "-c", "/etc/supervisord.conf"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I you want php8, just replace php7 with php8. (docker's magic)&lt;/p&gt;

&lt;p&gt;I made a git repo if you want to browse the files of my 'docker' folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Databse
&lt;/h2&gt;

&lt;p&gt;My database is hosted on a tinny VPS, so I didn't had to do anything.&lt;/p&gt;

&lt;p&gt;If you want to host your db on fly, they offer free 3GB &lt;br&gt;
postgres.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternative
&lt;/h2&gt;

&lt;p&gt;I didn't tried Fly : turboku launcher, but it may be a simpler way to migrate.&lt;/p&gt;

&lt;p&gt;see : &lt;a href="https://fly.io/launch/heroku" rel="noopener noreferrer"&gt;https://fly.io/launch/heroku&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With dockerfile your a not tied to a particular host, and can migrate smoothly between them.&lt;/p&gt;

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

&lt;p&gt;If you are looking to migrate your Heroku app, save yourself a couple of hours and take a look at my repo : &lt;a href="https://github.com/Thomas-Philippot/symfony-fly-starter" rel="noopener noreferrer"&gt;https://github.com/Thomas-Philippot/symfony-fly-starter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>symfony</category>
      <category>fly</category>
      <category>heroku</category>
      <category>docker</category>
    </item>
    <item>
      <title>How I deployed my Nuxt app on a rasberry pi</title>
      <dc:creator>Thomas</dc:creator>
      <pubDate>Mon, 17 Feb 2020 11:00:54 +0000</pubDate>
      <link>https://dev.to/thomas_ph35/how-i-deployed-my-nuxt-app-on-a-rasberry-pi-3apl</link>
      <guid>https://dev.to/thomas_ph35/how-i-deployed-my-nuxt-app-on-a-rasberry-pi-3apl</guid>
      <description>&lt;p&gt;I've recently purchased a rasberry pi to pratice my network and linux skills. &lt;br&gt;
I decided to install apache2 and try making available my own Nuxt app on the web ! (some of you guys knows how much I like using Nuxt)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer : ⚠️ &lt;br&gt;
I may say things that are "wrong" (not best practices), I only have 2 years experience and this project is for fun so if you notice something wrong, write it down it the comment section. Thank's&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Setting up the environement 🛠️
&lt;/h1&gt;

&lt;p&gt;First we need some essential tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pm2.keymetrics.io/" rel="noopener noreferrer"&gt;pm2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Apache_HTTP_Server" rel="noopener noreferrer"&gt;Apache2&lt;/a&gt; (obviously)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;nodejs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://curl.haxx.se/" rel="noopener noreferrer"&gt;curl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;let's run some commands to install eveything ! 👨‍💻&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;sudo &lt;/span&gt;apt update

&lt;span class="c"&gt;# install apache http server&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2

&lt;span class="c"&gt;# install node and npm&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;curl software-properties-common
&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://deb.nodesource.com/setup_12.x | &lt;span class="nb"&gt;sudo &lt;/span&gt;bash -

&lt;span class="c"&gt;# install git&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;git 

&lt;span class="c"&gt;# install pm2 globally&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;pm2 &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you should see Apache default page when requesting &lt;code&gt;localhost&lt;/code&gt; (or &lt;code&gt;127.0.0.1&lt;/code&gt;) on any web browser. 👍&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%2Fi%2Fxxuwbmyqz2westm0sg5q.jpg" 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%2Fi%2Fxxuwbmyqz2westm0sg5q.jpg" alt="Apache default page" width="500" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good ! now we only want to change this default page with our beatiful Nuxt js website !&lt;/p&gt;

&lt;h1&gt;
  
  
  Building the website 🏗️
&lt;/h1&gt;

&lt;p&gt;This is were git is going to be usefull.&lt;/p&gt;

&lt;p&gt;I'm not going to explain how I build my Nuxt app (it's still pretty empty), because this is not the point of this post.&lt;/p&gt;

&lt;p&gt;But you just need to know it's on GitHub, so we can use git to download and install it on my server (rasberry).&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; /var/www
&lt;span class="nv"&gt;$ &lt;/span&gt;git clone &lt;span class="s1"&gt;'our-git-repo'&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s1"&gt;'our-git-repo'&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;# Build your application with webpack and minify the JS &amp;amp; CSS (for production).&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Apache configuration ⚙️
&lt;/h1&gt;

&lt;p&gt;Now that we have apache up and running and our nuxt app, we just need to connect both of them. &lt;/p&gt;

&lt;h2&gt;
  
  
  Create a new virtual host
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# enable proxy http module&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;a2enmode proxy proxy_http
&lt;span class="c"&gt;# creating our new site&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /etc/apache2/sites-available/
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi our-site-name.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&amp;lt;&lt;span class="n"&gt;VirtualHost&lt;/span&gt; *:&lt;span class="m"&gt;80&lt;/span&gt;&amp;gt;
    &lt;span class="n"&gt;ServerName&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;.&lt;span class="n"&gt;our&lt;/span&gt;-&lt;span class="n"&gt;domaine&lt;/span&gt;.&lt;span class="n"&gt;com&lt;/span&gt;
    &lt;span class="c"&gt;#ServerAdmin webmaster@localhost
&lt;/span&gt;    &lt;span class="n"&gt;DocumentRoot&lt;/span&gt; /&lt;span class="n"&gt;var&lt;/span&gt;/&lt;span class="n"&gt;www&lt;/span&gt;/&lt;span class="n"&gt;OUR&lt;/span&gt;-&lt;span class="n"&gt;DIRECTORY&lt;/span&gt;-&lt;span class="n"&gt;NAME&lt;/span&gt;

    &lt;span class="n"&gt;ErrorLog&lt;/span&gt; ${&lt;span class="n"&gt;APACHE_LOG_DIR&lt;/span&gt;}/&lt;span class="n"&gt;error&lt;/span&gt;.&lt;span class="n"&gt;log&lt;/span&gt;
    &lt;span class="n"&gt;CustomLog&lt;/span&gt; ${&lt;span class="n"&gt;APACHE_LOG_DIR&lt;/span&gt;}/&lt;span class="n"&gt;access&lt;/span&gt;.&lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="n"&gt;combined&lt;/span&gt;

        &lt;span class="c"&gt;# has Nuxt runs on port 3000
&lt;/span&gt;    &lt;span class="n"&gt;ProxyPass&lt;/span&gt; / &lt;span class="n"&gt;http&lt;/span&gt;://&lt;span class="n"&gt;localhost&lt;/span&gt;:&lt;span class="m"&gt;3000&lt;/span&gt;/
    &lt;span class="n"&gt;ProxyPassReverse&lt;/span&gt; / &lt;span class="n"&gt;http&lt;/span&gt;://&lt;span class="n"&gt;localhost&lt;/span&gt;:&lt;span class="m"&gt;3000&lt;/span&gt;/
&amp;lt;/&lt;span class="n"&gt;VirtualHost&lt;/span&gt;&amp;gt;
&lt;span class="c"&gt;# :wq to save and exit
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have told apache to deliver our nuxt app on http request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enable the new site and disable the default one
&lt;/h2&gt;

&lt;p&gt;We just need to replace apache default page with our site.&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;# enable our nuxt site&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;a2ensite our-site-name.conf
&lt;span class="c"&gt;# disable apache default page&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;a2disite 000-default.conf
&lt;span class="c"&gt;#reload apache service&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And were good to go !👏&lt;/p&gt;

&lt;h1&gt;
  
  
  Start Nuxt server 🏁
&lt;/h1&gt;

&lt;p&gt;Now you will probably think we only need to open the web browser to see our Nuxt app, but we need one more step.&lt;/p&gt;

&lt;p&gt;Because Nuxt use Server side rendering, we need to start the node.js server with &lt;code&gt;npm start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Pm2 will be perfect for that purpose !&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; /var/www/our-directory-name
&lt;span class="nv"&gt;$ &lt;/span&gt;pm2 start &lt;span class="s1"&gt;'npm start'&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"NUXT APP"&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;pm2 save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cool ! Our node.js server is started and will be reloaded by pm2 if it turns off.&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;# optional : to start the node.js server on startup&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;pm2 startup
&lt;span class="c"&gt;# then run the command in output&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requesting &lt;code&gt;localhost&lt;/code&gt; should show our beatiful Nuxt app.&lt;br&gt;
We did it ! 🎉&lt;/p&gt;

&lt;h1&gt;
  
  
  Open our APP on the web 🌐
&lt;/h1&gt;

&lt;p&gt;We just need to configure our router to open 80 (and 443 if ssl/tls is configured), and forward to the server (rasberry pi).&lt;br&gt;
Fortunalty my IAP provides a web interface to do so.&lt;/p&gt;

&lt;p&gt;Requesting our domain name or our router ip address show the Nuxt app has well.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tips for rasberry : you can open port 22 to control your rasberry with ssh from outside your local network&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;It was such a good training to deploy this on my rasberry pi !&lt;br&gt;
I really wasn't shure it will handle it.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>apache</category>
      <category>rasberrypi</category>
      <category>ssr</category>
    </item>
    <item>
      <title>5 WebStorm shortcuts I use everyday</title>
      <dc:creator>Thomas</dc:creator>
      <pubDate>Mon, 27 May 2019 14:24:21 +0000</pubDate>
      <link>https://dev.to/thomas_ph35/5-webstorm-shortcuts-i-use-everyday-3799</link>
      <guid>https://dev.to/thomas_ph35/5-webstorm-shortcuts-i-use-everyday-3799</guid>
      <description>&lt;p&gt;I'm using WebStorm IDE since I have a student license and one of the things I really like is the shortcuts !&lt;/p&gt;

&lt;p&gt;We are writting a lot along the day and we are most of the time making the same actions over and over again.&lt;/p&gt;

&lt;p&gt;This is why I searched for a faster way to do them. 🚅&lt;/p&gt;

&lt;h1&gt;
  
  
  1- Multiline editing
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;alt&lt;/code&gt; + &lt;code&gt;left-click&lt;/code&gt; this let you edit everywhere in you code.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddh7g0teod6p3tjhg5e2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddh7g0teod6p3tjhg5e2.gif" alt="multi-line" width="696" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1.2 Multiline with text search
&lt;/h2&gt;

&lt;p&gt;you can select next text occurence with &lt;code&gt;alt&lt;/code&gt; + &lt;code&gt;j&lt;/code&gt; and then edit multiple line in once. (useful if you forget a porperty)&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmf2mghhs3uqgb8rnuc4x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmf2mghhs3uqgb8rnuc4x.gif" alt="multi-line 2" width="800" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠ Do not consider this as a rename tool.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  2- Duplicate a line
&lt;/h1&gt;

&lt;p&gt;this one seems useless but it's a real time saver.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspr32osfd6pn8vt3x3s4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspr32osfd6pn8vt3x3s4.gif" alt="ctrl-D" width="800" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I sometime use it to 'multi line edit afterwards'.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  3- Moving things around
&lt;/h1&gt;

&lt;p&gt;You can also move you lines up and down with &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + (up or down) so you are not forced to copy/cut.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4ehxcfff5j1z1i9qtn6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4ehxcfff5j1z1i9qtn6.gif" alt="moving lines" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;this also works really great with JSON...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  4- Clipboard History
&lt;/h1&gt;

&lt;p&gt;did you knew that Webstorm keep in history the content you have copied/cuted ?&lt;br&gt;
Well now you know ! you can choose what to past with &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;v&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10wzei8ssf5mfbzmx9ya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F10wzei8ssf5mfbzmx9ya.png" alt="clipboard history" width="800" height="804"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5- Growing selection
&lt;/h1&gt;

&lt;p&gt;when selecting something you can grow the current selection to the next level with &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;w&lt;/code&gt; to lower the selection hit &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;w&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqhpukiuru9zs0ni4khf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqhpukiuru9zs0ni4khf.gif" alt="selection" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;This is one of the reasons I love WebStorm. let me know if you have other useful shortcuts. and if you learned some of them ! 🎉&lt;/p&gt;

</description>
      <category>webstorm</category>
      <category>javascript</category>
      <category>discuss</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Google Login with Firebase and Nuxt</title>
      <dc:creator>Thomas</dc:creator>
      <pubDate>Mon, 06 May 2019 15:05:04 +0000</pubDate>
      <link>https://dev.to/thomas_ph35/google-login-with-firebase-and-nuxt-31kk</link>
      <guid>https://dev.to/thomas_ph35/google-login-with-firebase-and-nuxt-31kk</guid>
      <description>&lt;p&gt;Wanna add a 'Log in with Google' button in your app in minutes ?&lt;br&gt;
Here is how I did it !&lt;/p&gt;
&lt;h1&gt;
  
  
  Environement
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Node &lt;a class="mentioned-user" href="https://dev.to/11"&gt;@11&lt;/a&gt;.0.0&lt;/li&gt;
&lt;li&gt;Vue @3.0.4&lt;/li&gt;
&lt;li&gt;Npm @6.9.0&lt;/li&gt;
&lt;li&gt;Nuxt @2.6.3&lt;/li&gt;
&lt;li&gt;Vuetify @1.3.3&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Docs
&lt;/h2&gt;

&lt;p&gt;Nuxt : &lt;a href="https://nuxtjs.org/"&gt;https://nuxtjs.org/&lt;/a&gt;&lt;br&gt;
Firebase : &lt;a href="https://firebase.google.com/docs/"&gt;https://firebase.google.com/docs/&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Firebase installation
&lt;/h1&gt;

&lt;p&gt;To install firebase to you Nuxt project simply run the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;firebase &lt;span class="nt"&gt;--save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and create a file like &lt;code&gt;firebase.js&lt;/code&gt; into your &lt;code&gt;pulgins&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Go to your Firebase console and create a new project. after registering your project you will be able to find your firebase config object.&lt;/p&gt;

&lt;p&gt;here how to find it : &lt;a href="http://support.google.com/firebase/answer/7015592"&gt;http://support.google.com/firebase/answer/7015592&lt;/a&gt;&lt;br&gt;
(our app type is &lt;code&gt;web app&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;now that you have your firebase config object let's register it into your nuxt plugin !&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="c1"&gt;// /plugins/firebase.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;firebase&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;firebase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;firebaseConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;api-key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;authDomain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;project-id.firebaseapp.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;databaseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://project-id.firebaseio.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;project-id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;storageBucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;project-id.appspot.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messagingSenderId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sender-id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;appID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app-id&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;database&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;don't forget to add &lt;code&gt;'~/plugins/firebase.js'&lt;/code&gt; to your &lt;code&gt;nuxt.config.js&lt;/code&gt; in the &lt;code&gt;plugins&lt;/code&gt; section.&lt;/p&gt;

&lt;p&gt;And you will be ready to go !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;at this time you will still need to &lt;code&gt;import firebase from 'firebase'&lt;/code&gt; into the pages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Sign in with popup
&lt;/h1&gt;

&lt;p&gt;I will be using the &lt;code&gt;signInWithPopup()&lt;/code&gt; method provided by firebase in this exemple&lt;/p&gt;

&lt;h2&gt;
  
  
  Button
&lt;/h2&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;v-btn&lt;/span&gt; &lt;span class="na"&gt;outline&lt;/span&gt; &lt;span class="na"&gt;fab&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"googleSignIn"&lt;/span&gt; &lt;span class="na"&gt;color=&lt;/span&gt;&lt;span class="s"&gt;"#4285F4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;v-icon&amp;gt;&lt;/span&gt;fab fa-google&lt;span class="nt"&gt;&amp;lt;/v-icon&amp;gt;&amp;lt;/v-btn&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Method
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;      &lt;span class="nf"&gt;googleSignIn &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;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GoogleAuthProvider&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nx"&gt;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;signInWithPopup&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;provider&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;result&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// store the user ore wathever&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;$router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/home&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;e&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;$snotify&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&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;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&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;blockquote&gt;
&lt;p&gt;the user informations are stored into &lt;code&gt;result.user&lt;/code&gt;. up to you to store theme where you want !&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Well done ! 👋
&lt;/h2&gt;

&lt;p&gt;that's it ! if your firebase app is correctly registered, you should be able to fetch your Google accounts informations !&lt;/p&gt;

&lt;p&gt;let me know if you had difficulties with firebase ore if i made any mistake, i'm still learning !&lt;/p&gt;

</description>
      <category>vue</category>
      <category>nuxt</category>
      <category>firebase</category>
    </item>
    <item>
      <title>How I built a desktop app with vue in minutes</title>
      <dc:creator>Thomas</dc:creator>
      <pubDate>Thu, 21 Feb 2019 14:08:03 +0000</pubDate>
      <link>https://dev.to/thomas_ph35/how-i-built-a-desktop-app-with-vue-in-minutes-1005</link>
      <guid>https://dev.to/thomas_ph35/how-i-built-a-desktop-app-with-vue-in-minutes-1005</guid>
      <description>&lt;p&gt;When it comes to desktop app, electron is a powerful tool. You can build cross-platform applications in one shot.&lt;/p&gt;

&lt;p&gt;As I like vue, i've triyed created an application with 'electron-vue' and this is how simple it is !&lt;/p&gt;

&lt;p&gt;Let's make a weather app using OpenWeatherMap API&lt;/p&gt;

&lt;h1&gt;
  
  
  🛠️ Installation
&lt;/h1&gt;

&lt;p&gt;I was using Ubuntu 18.04 and Webstorm IDE. I also like vuetify components so I installed the vuetify/electron repository&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Looks like the GitHub repo doesn't exist anymore..&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To install the project run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vue init vuetifyjs/electron my-project

cd my-project
npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Now you are ready to go !
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwss0o6hltx4g5wegwwii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwss0o6hltx4g5wegwwii.png" alt="the boiler plate" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then to display the weather, i will need :&lt;/p&gt;

&lt;p&gt;-Highest temperature &lt;br&gt;
-Lowest temperature&lt;br&gt;
-Humidity&lt;/p&gt;

&lt;p&gt;So let's change that page into what we need ! I'm using two Card component, one to search the city and the other one will then display the weather&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;v-card&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;v-card-text&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Welcome to my météo app.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Search for a city to display the weather&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;v-text-field&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"City"&lt;/span&gt; &lt;span class="na"&gt;box&lt;/span&gt; &lt;span class="na"&gt;v-model=&lt;/span&gt;&lt;span class="s"&gt;"city"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/v-text-field&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/v-card-text&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;v-card-actions&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;v-spacer&amp;gt;&amp;lt;/v-spacer&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;v-btn&lt;/span&gt; &lt;span class="na"&gt;primary&lt;/span&gt; &lt;span class="na"&gt;flat&lt;/span&gt; &lt;span class="na"&gt;router&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"getWeather"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Search&lt;span class="nt"&gt;&amp;lt;/v-btn&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/v-card-actions&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/v-card&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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;v-card&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"show"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;v-card-text&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;v-layout&lt;/span&gt; &lt;span class="na"&gt;row&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;v-layout&lt;/span&gt; &lt;span class="na"&gt;xs6&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;v-card-text&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;v-spacer&amp;gt;&amp;lt;/v-spacer&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{{temp.toFixed(2)}}°C&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{{weatherDescription}}&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/v-card-text&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/v-layout&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;v-layout&lt;/span&gt; &lt;span class="na"&gt;xs6&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;v-card-text&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;v-icon&amp;gt;&lt;/span&gt;fas fa-snowflake&lt;span class="nt"&gt;&amp;lt;/v-icon&amp;gt;&lt;/span&gt;Min : {{ tempMin.toFixed(2) }}°C&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;v-icon&amp;gt;&lt;/span&gt;fas fa-sun&lt;span class="nt"&gt;&amp;lt;/v-icon&amp;gt;&lt;/span&gt;Max : {{ tempMax.toFixed(2) }}°C&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;v-icon&amp;gt;&lt;/span&gt;fas fa-tint&lt;span class="nt"&gt;&amp;lt;/v-icon&amp;gt;&lt;/span&gt;Humidity : {{ humidity }} %&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/v-card-text&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/v-layout&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/v-layout&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/v-card-text&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/v-card&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  💻Requesting the API
&lt;/h1&gt;

&lt;p&gt;I now need to code my getWeather function&lt;/p&gt;

&lt;p&gt;I'm using axios to make API requests, I then store the data i want into my app&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;the API endpoint is '/data/2.5/weather'&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&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;SystemInformation&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;./WelcomeView/SystemInformation&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;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;baseURL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://api.openweathermap.org/data/2.5&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;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;welcome&lt;/span&gt;&lt;span class="dl"&gt;'&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;SystemInformation&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;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;country&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;weatherDescription&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;temp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;tempMin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;tempMax&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;humidity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;show&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;863668499362fb4884ebd97229f3b26b&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;url&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.openweathermap.org/data/2.5/weather&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;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;open &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;link&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;$electron&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openExternal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="nf"&gt;getWeather &lt;/span&gt;&lt;span class="p"&gt;()&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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;q&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;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;appid&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;key&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;response&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;temp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;temp&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;274&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;tempMax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;temp_max&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;274&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;tempMin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;temp_min&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;274&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;humidity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;humidity&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;weatherDescription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&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="nx"&gt;weather&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;description&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;show&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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;errors&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;errors&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;h1&gt;
  
  
  🌟 And that's it !
&lt;/h1&gt;

&lt;p&gt;Simple as a classique Vue js application, I just made a simple cross-plateform application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4i40e9d08rs84lm7mbb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4i40e9d08rs84lm7mbb.png" alt="my-final app in vue" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this was my first electron app, and also my first blog post&lt;/p&gt;

&lt;p&gt;I really loved it because i'm able to use the same app on Windows, MacOs and Ubuntu (has i work on ubuntu)&lt;/p&gt;

&lt;p&gt;feel free to tell me about stuff i made wrong ore i could have done better, and to share some cool stuff to work on !&lt;/p&gt;

</description>
      <category>vue</category>
      <category>electron</category>
      <category>openweathermap</category>
    </item>
  </channel>
</rss>
