<?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>Forem: Francesco Napoletano</title>
    <description>The latest articles on Forem by Francesco Napoletano (@napo).</description>
    <link>https://forem.com/napo</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%2F22320%2Fcb848158-9dd2-4228-8745-cfb14d0d3fa6.png</url>
      <title>Forem: Francesco Napoletano</title>
      <link>https://forem.com/napo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/napo"/>
    <language>en</language>
    <item>
      <title>How to get into "the zone" while programming?</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Mon, 13 Dec 2021 17:51:23 +0000</pubDate>
      <link>https://forem.com/napo/how-to-get-into-the-zone-while-programming-30g</link>
      <guid>https://forem.com/napo/how-to-get-into-the-zone-while-programming-30g</guid>
      <description>&lt;p&gt;The &lt;a href="https://www.urbandictionary.com/define.php?term=In%20The%20Zone" rel="noopener noreferrer"&gt;Urban Dictionary&lt;/a&gt; definition of "the zone" is really on the spot IMHO.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Being Completely unaware of what's going on around you as you are so extremely into what's going on right in front of your face; like anything more than 3 feet away just doesn't register in the brain.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  So, how do I get into "the zone" in order to work as much as possible?
&lt;/h3&gt;

&lt;p&gt;It's really personal and here is what's working for me recently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Spotify playlist of electronic music with few lyrics. &lt;a href="https://open.spotify.com/playlist/5eOQqbVQKUzP0YPuuuwxKM?si=9477b9130f1c43d0" rel="noopener noreferrer"&gt;I like this one from John Resig, the creator of jQuery&lt;/a&gt;, but there are many, just try some of them and find what you like&lt;/li&gt;
&lt;li&gt;Shut down notifications from your phone&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://selfcontrolapp.com/" rel="noopener noreferrer"&gt;SelfControl&lt;/a&gt; or similar apps to block websites and social networks you use to procrastinate&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Can you share some suggestion? What do you use to get into "the zone" while programming?
&lt;/h4&gt;

</description>
      <category>working</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to handle rejection when interviewing</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Wed, 19 Aug 2020 16:35:02 +0000</pubDate>
      <link>https://forem.com/napo/how-to-handle-rejection-when-interviewing-2755</link>
      <guid>https://forem.com/napo/how-to-handle-rejection-when-interviewing-2755</guid>
      <description>&lt;p&gt;If you’ve faced several rejections so far in your job search, it can be easy to feel dejected and disheartened. &lt;strong&gt;Here are some suggestions that helped me a lot in the past&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Remember: it’s not only about you!&lt;/strong&gt; If you’ve prepared fully and tried your best, there’s little else you could have done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rejection is not feedback&lt;/strong&gt;. Don’t just assume that everything you’ve done was wrong. Ask politely for a feedback if you feel so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You just learned something new&lt;/strong&gt;. Even rejection is a lesson, remember this!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;And now try again!!!&lt;/strong&gt; Next time you might score your next perfect job!&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>What is Deno? A 1 minute read</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Thu, 11 Jun 2020 16:40:58 +0000</pubDate>
      <link>https://forem.com/napo/what-is-deno-a-1-minute-read-2eo0</link>
      <guid>https://forem.com/napo/what-is-deno-a-1-minute-read-2eo0</guid>
      <description>&lt;p&gt;A 1 minute read post about Deno, &lt;strong&gt;the new kid in town&lt;/strong&gt;. Is Node.js safe? Yes. Will you need to learn something new soon? &lt;strong&gt;Probably&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://deno.land" rel="noopener noreferrer"&gt;Deno&lt;/a&gt; is a project (written in Rust) which was created by the original creator of Node.js, Ryan Dahl and has recently gone 1.0 (currently 1.0.5).&lt;/p&gt;

&lt;p&gt;It's defined on its website as:&lt;/p&gt;

&lt;h4&gt;
  
  
  A secure runtime for JavaScript and TypeScript
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Read also: &lt;a href="https://kitsonkelly.com/posts/deno-is-a-browser-for-code/" rel="noopener noreferrer"&gt;https://kitsonkelly.com/posts/deno-is-a-browser-for-code/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;See also: &lt;a href="https://github.com/denolib/awesome-deno" rel="noopener noreferrer"&gt;https://github.com/denolib/awesome-deno&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Deno runtime is secure?
&lt;/h3&gt;

&lt;p&gt;In Deno by default your code can not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access the filesystem&lt;/li&gt;
&lt;li&gt;Access the network&lt;/li&gt;
&lt;li&gt;Access the environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To allow this, you have to explicitly enable access by providing a flag when executing your code. &lt;/p&gt;

&lt;p&gt;Deno is trying to bring the "disabled by default" nature of the browser, to the server-side. They do this by sandboxing your code mostly like a browser does.&lt;/p&gt;

&lt;p&gt;Here is an example.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;If you run this without using the &lt;code&gt;--allow-net&lt;/code&gt; flag you'll see an error.&lt;/p&gt;

&lt;p&gt;So to run this server you need to type &lt;code&gt;deno run --allow-net server.ts&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the features of Deno's runtime?
&lt;/h3&gt;

&lt;p&gt;In Deno things are quite different from Node.js, in particular:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dependency management&lt;/strong&gt; (URLs instead of package.json, still somehow controversial for some people and some alternatives have been proposed)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A secure/audited standard library is available&lt;/strong&gt;! &lt;a href="https://deno.land/std" rel="noopener noreferrer"&gt;https://deno.land/std&lt;/a&gt; (HTTP, websockets, UUID, DateTime, etc...)&lt;/li&gt;
&lt;li&gt;Unlike Node.js, where once built/compiled you are given a set of files, with a single entry point, &lt;strong&gt;Deno will always give you a single executable binary&lt;/strong&gt; (great for portability)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Built-In linting and much more is coming in version 1.1!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TypeScript by default
&lt;/h3&gt;

&lt;p&gt;In Deno there’s no difference in running JavaScript code or TypeScript code. In Node.js, you have to configure your project to compile TypeScript and while improved, the process is not yet friendly for new users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Done, I told you this was fast&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Check also the &lt;a href="https://deno.land" rel="noopener noreferrer"&gt;deno.land&lt;/a&gt; website! &lt;a href="https://www.youtube.com/watch?v=NHHhiqwcfRM" rel="noopener noreferrer"&gt;And this 50 minutes crash course about Deno&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>node</category>
      <category>deno</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>A Facebook crawler was making 7M requests per day to my stupid website</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Mon, 08 Jun 2020 20:06:28 +0000</pubDate>
      <link>https://forem.com/napo/a-facebook-bot-was-making-7m-requests-per-day-to-my-stupid-website-4pai</link>
      <guid>https://forem.com/napo/a-facebook-bot-was-making-7m-requests-per-day-to-my-stupid-website-4pai</guid>
      <description>&lt;p&gt;I own a little website I use for some SEO experiments. Of course there's some content and a facebook sharing button for every post. The website is so little it runs on a "single controller" PHP app + a 400kb SQLite db, but can generate thousands of different pages.&lt;/p&gt;

&lt;p&gt;Everything is hosted (together with a bunch of other websites) on a cheap DigitalOcean machine + free cloudflare plan for some caching. One of those websites has some alerting and it started to alert me about being down.&lt;/p&gt;

&lt;p&gt;After some investigations I've found out the problem... &lt;a href="https://developers.facebook.com/docs/sharing/webmasters/crawler/" rel="noopener noreferrer"&gt;the Facebook Crawler&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That crawler was making more than 7M requests per day&lt;/strong&gt; (with a peak of 300req/second) to that website.&lt;/p&gt;

&lt;p&gt;Their doc was not helping on how to block the bot.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;og:ttl -&amp;gt; ignored &lt;/li&gt;
&lt;li&gt;robots.txt -&amp;gt; ignored &lt;/li&gt;
&lt;li&gt;HTTP 429 -&amp;gt; ignored&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had to block the user-agent using &lt;a href="https://cloudflare.com" rel="noopener noreferrer"&gt;cloudflare&lt;/a&gt; rules.&lt;/p&gt;

&lt;p&gt;If there's someone working on that crawler here on dev.to, &lt;strong&gt;please stop ignoring basic Internet netiquette about crawlers&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Next time you could hit someone on AWS. And then they'll probably ask you to pay the bill ;)&lt;/p&gt;

</description>
      <category>facebook</category>
      <category>php</category>
      <category>digitalocean</category>
      <category>app</category>
    </item>
    <item>
      <title>So, you want to be a programmer?</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Fri, 22 May 2020 14:58:17 +0000</pubDate>
      <link>https://forem.com/napo/so-you-want-to-be-a-programmer-6d1</link>
      <guid>https://forem.com/napo/so-you-want-to-be-a-programmer-6d1</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;a href="https://coding.napolux.com/so-you-want-to-be-a-programmer/" rel="noopener noreferrer"&gt;Originally published on my blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;How many times have you said this?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'd like to learn to code some day."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sitting at coffee with a friend:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I'd like to create a website some day."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mingling at the office Christmas party:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I want to create an app some day."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Plenty of people are wannabe programmers. They'll tell you about their idea, all the research they've done, the cool features they've come up with. &lt;strong&gt;Very few actually do anything about it&lt;/strong&gt;. They sit on their nice, comfy couches and say, "I'd like to learn to code some day."&lt;/p&gt;

&lt;p&gt;You've said it yourself, haven't you? &lt;strong&gt;The couch is very comfortable&lt;/strong&gt;. No one blames you. You work hard at your job. When you get home, you're tired. The couch calls to you: Rest! You've earned it! A fellow enjoying his well-earned rest on the couch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But do you ever wonder?&lt;/strong&gt; Do you ever wonder what it would be like?&lt;/p&gt;

&lt;p&gt;To create that app that's in your head. To see it outside your head, on a screen. &lt;strong&gt;But apps or websites don't get there by themselves&lt;/strong&gt;. Programs need a programmer to write them. Do you want to be a programmer?&lt;/p&gt;

&lt;p&gt;If so, there are two things you absolutely have to do.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decide you want to be a programmer.&lt;/li&gt;
&lt;li&gt;Prove to yourself that you are a programmer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you want to be a programmer? Say it, prove it.&lt;/p&gt;

&lt;p&gt;Prove to yourself that you're a programmer. What does a programmer do? A programmer writes code. You must write code. &lt;/p&gt;

&lt;p&gt;Any pro will tell you (I consider myself a professional programmer), the secret is perseverance. Programmers write code.&lt;/p&gt;

&lt;p&gt;It's really that simple.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://couchto50k.club" rel="noopener noreferrer"&gt;Adapted from couchto50k.club&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now, if you're already a programmer, share this article with the guy/girl you know is always saying: "I want to learn to code some day".&lt;/p&gt;

</description>
      <category>programming</category>
      <category>motivational</category>
      <category>coaching</category>
    </item>
    <item>
      <title>I published two books last week and you can publish a book too!</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Sat, 09 May 2020 11:01:55 +0000</pubDate>
      <link>https://forem.com/napo/i-published-two-books-last-week-and-you-can-publish-a-book-too-bkh</link>
      <guid>https://forem.com/napo/i-published-two-books-last-week-and-you-can-publish-a-book-too-bkh</guid>
      <description>&lt;p&gt;Ok, so this was the plan last monday morning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have a one week long holiday (at home, thanks Covid-19) with my wife working in the other room (no kids or pets around)&lt;/li&gt;
&lt;li&gt;I'm a programmer (they pay me to program, so I must be good)&lt;/li&gt;
&lt;li&gt;I want to achieve "something" by the end of the week&lt;/li&gt;
&lt;li&gt;I want to do something "print related"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Spoiler: &lt;strong&gt;I have two books published on Amazon!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Yes, you got it&lt;/strong&gt;. I've published two books on Amazon in less than a week. More specifically two sudoku puzzle books:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/dp/B088B6XW6G/" rel="noopener noreferrer"&gt;360 sudoku puzzles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/1200-Sudoku-Puzzles-intermediate-solutions/dp/B088B8MFNN/" rel="noopener noreferrer"&gt;1200 sudoku puzzles&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why?
&lt;/h3&gt;

&lt;p&gt;I didn't want to publish just another app. I choose something you can print and touch. A book was the best choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  How?
&lt;/h3&gt;

&lt;p&gt;If you follow me you've probably read this post: &lt;a href="https://dev.toHow%20to%20generate%20PDFs%20from%20web%20pages"&gt;https://dev.to/napolux/how-to-generate-pdf-from-web-pages-5781&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, I've used a Sudoku generator in a little PHP app to generate HTML books. Then I created the "master" PDF file for my book with &lt;a href="https://weasyprint.org/" rel="noopener noreferrer"&gt;Weasyprint&lt;/a&gt; and a cover with &lt;a href="https://www.canva.com" rel="noopener noreferrer"&gt;Canva.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I've spent a couple of days fine-tuning my PDF and then I was ready.&lt;/p&gt;

&lt;p&gt;The final book and cover were uploaded to the &lt;a href="https://kdp.amazon.com" rel="noopener noreferrer"&gt;Amazon KDP platform&lt;/a&gt;, et voilà, my books were ready to be printed on demand! No ebook as I said, a real book!&lt;/p&gt;

&lt;h3&gt;
  
  
  You can publish a book (or an ebook) too!
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;So, what's blocking you?&lt;/strong&gt; You can easily publish (and sell) a book in a matter of minutes. Your blog posts and tutorials, your ideas, your puzzles, your personal diary or that novel about dinosaurs that work as programmers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We all have something to say&lt;/strong&gt;. This time were Sudokus, but I'll probably publish something more in the next weeks!&lt;/p&gt;

&lt;h3&gt;
  
  
  Will I make money?
&lt;/h3&gt;

&lt;p&gt;I don't know and I don't care. The achievement was really what I was looking for (at least for now).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you have any question, just ask in the comments section!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  My two books
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/dp/B088B6XW6G/" rel="noopener noreferrer"&gt;360 sudoku puzzles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/1200-Sudoku-Puzzles-intermediate-solutions/dp/B088B8MFNN/" rel="noopener noreferrer"&gt;1200 sudoku puzzles&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sideprojects</category>
      <category>books</category>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to generate PDF from web pages</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Mon, 04 May 2020 07:56:51 +0000</pubDate>
      <link>https://forem.com/napo/how-to-generate-pdf-from-web-pages-5781</link>
      <guid>https://forem.com/napo/how-to-generate-pdf-from-web-pages-5781</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;a href="https://coding.napolux.com/how-to-generate-pdf-from-web-pages/" rel="noopener noreferrer"&gt;Originally published on my blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For a little project of mine &lt;strong&gt;I had to generate PDF files from a fairly complex HTML web page&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The original page was created in PHP, so I’ve looked at libraries like &lt;a href="https://github.com/dompdf/dompdf" rel="noopener noreferrer"&gt;dompdf&lt;/a&gt; and &lt;a href="https://tcpdf.org/" rel="noopener noreferrer"&gt;TCPDF&lt;/a&gt; I used many years ago. They’re still like 10 years ago… Not working well with CSS3 and tables.&lt;/p&gt;

&lt;p&gt;After many tries the only library working fine was &lt;a href="https://weasyprint.org/" rel="noopener noreferrer"&gt;WeasyPrint&lt;/a&gt;. You can use in your Python projects or from the command line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;weasyprint https://napolux.com output.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect output and small PDF size. &lt;strong&gt;Give it a try!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>php</category>
      <category>python</category>
    </item>
    <item>
      <title>Signs it's time to leave your company</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Tue, 21 Apr 2020 08:37:11 +0000</pubDate>
      <link>https://forem.com/napo/signs-it-s-time-to-leave-your-company-2b13</link>
      <guid>https://forem.com/napo/signs-it-s-time-to-leave-your-company-2b13</guid>
      <description>&lt;p&gt;&lt;a href="https://twitter.com/catalinmpit" rel="noopener noreferrer"&gt;@catalinmpit&lt;/a&gt; asked this question yesterday on twitter...&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1252176504957566976-147" src="https://platform.twitter.com/embed/Tweet.html?id=1252176504957566976"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1252176504957566976-147');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1252176504957566976&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;This is an easy one, happened to me in 2019: &lt;strong&gt;you know it's time to move on when&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You're no longer having fun&lt;/li&gt;
&lt;li&gt;You're not learning or applying anything new in your daily routine&lt;/li&gt;
&lt;li&gt;You have no mentors in the company&lt;/li&gt;
&lt;li&gt;You struggle for challenges, but challenges are not there anymore&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>programming</category>
      <category>coding</category>
      <category>work</category>
      <category>career</category>
    </item>
    <item>
      <title>A weather API with Node.js, OvernightJS and TypeScript</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Sat, 04 Apr 2020 07:36:14 +0000</pubDate>
      <link>https://forem.com/napo/a-weather-api-with-node-js-overnightjs-and-typescript-4md2</link>
      <guid>https://forem.com/napo/a-weather-api-with-node-js-overnightjs-and-typescript-4md2</guid>
      <description>&lt;p&gt;I am, like many of us, working from home. I leave my house only for basic necessities, like food or emergencies. My time is split between work, my wife, videogames and some side-projects.&lt;/p&gt;

&lt;p&gt;While cleaning up my GitHub account I've found this little project I made a while ago: &lt;strong&gt;a weather API with Node.js, OvernightJS and TypeScript&lt;/strong&gt;. I was pretty proud of it (it's 100% TypeScript, there's automatic documentation, linting and tests), so I said: "Let's write a post about it".&lt;/p&gt;

&lt;p&gt;My goal was to map the OpenWeatherMap API to serve a subset of its data in our app, while learning OvernightJS.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is OvernightJS?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/seanpmaxwell/overnight/" rel="noopener noreferrer"&gt;OvernightJS&lt;/a&gt; is a simple library to add &lt;a href="https://www.typescriptlang.org/docs/handbook/decorators.html" rel="noopener noreferrer"&gt;TypeScript decorators&lt;/a&gt; to &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;Express&lt;/a&gt; routes. &lt;/p&gt;

&lt;p&gt;The thing I like the most about OvernightJS is its simplicity: it's not meant to act as an extra layer on top of Express or take you away from the RESTful style of writing back-end web APIs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://levelup.gitconnected.com/overnightjs-the-best-way-to-use-expressjs-with-typescript-35d71941aade" rel="noopener noreferrer"&gt;Check this tutorial&lt;/a&gt; if you want to get started with OvernightJS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's start
&lt;/h3&gt;

&lt;p&gt;Ok, what will this project do? The app will expose 3 endpoints for 3 specific cities: Stockholm, Madrid and Milan.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ENDPOINTS&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://localhost:4000/api/weather/CITY/forecast" rel="noopener noreferrer"&gt;http://localhost:4000/api/weather/CITY/forecast&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Forecast for CITY (stockholm,madrid,amsterdam)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://localhost:4000/api/weather/CITY/current" rel="noopener noreferrer"&gt;http://localhost:4000/api/weather/CITY/current&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Current weather for CITY (stockholm,madrid,amsterdam)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="http://localhost:4000/api/weather/stats" rel="noopener noreferrer"&gt;http://localhost:4000/api/weather/stats&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Avg. temp for the 3 cities and the highest temp/humidity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Application setup
&lt;/h3&gt;

&lt;p&gt;First of all: for safety reasons, the API token is not included in this repo. Please check &lt;code&gt;.env.example&lt;/code&gt; for details. Get an API key from &lt;a href="https://openweathermap.org/api" rel="noopener noreferrer"&gt;https://openweathermap.org/api&lt;/a&gt; and store it in a file called &lt;code&gt;.env&lt;/code&gt; file at the root of your project.&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;# The port where the application is listening&lt;/span&gt;
&lt;span class="nv"&gt;APPLICATION_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4000

&lt;span class="c"&gt;# The https://openweathermap.org/ API token&lt;/span&gt;
&lt;span class="nv"&gt;OWM_APP_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;YOUR_API_TOKEN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's setup our app. We're adding a bit of stuff here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application scripts in &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tsconfig.json&lt;/code&gt; for TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tslint.json&lt;/code&gt; for linting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g typescript
tsc --init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should find your TypeScript config file in the root of your project. If you want to follow a more detailed guide check &lt;a href="https://medium.com/free-code-camp/how-to-set-up-a-typescript-project-67b427114884" rel="noopener noreferrer"&gt;https://medium.com/free-code-camp/how-to-set-up-a-typescript-project-67b427114884&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can just grab the three files mentioned above from the &lt;a href="https://github.com/napolux/weather-api-typescript" rel="noopener noreferrer"&gt;github repo&lt;/a&gt; if you're lazy.&lt;/p&gt;

&lt;p&gt;Let's dive a bit into these files&lt;/p&gt;

&lt;h3&gt;
  
  
  package.json
&lt;/h3&gt;

&lt;p&gt;Apart from the packages (you can install them by running an &lt;code&gt;npm install&lt;/code&gt; once the file is in your project directory) the interesting part here is the &lt;code&gt;scripts&lt;/code&gt; section.&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="nl"&gt;"scripts"&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;"docs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./node_modules/.bin/typedoc --out docs --mode modules src"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start-dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nodemon --config &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;./util/nodemon.json&lt;/span&gt;&lt;span class="se"&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;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rm -rf ./dist/ &amp;amp;&amp;amp; tsc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node dist/start.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;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./node_modules/.bin/mocha -r ts-node/register src/**/*.spec.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"lint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tslint --fix -c tslint.json 'src/**/*.ts'"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scripts are pretty self-explanatory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docs&lt;/code&gt; generates the app documentation using &lt;a href="https://typedoc.org/" rel="noopener noreferrer"&gt;TypeDoc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;start-dev&lt;/code&gt; launches the app in "watch-mode" for your local environment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;build&lt;/code&gt; compiles the code for distribution&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;start&lt;/code&gt; launches the app &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test&lt;/code&gt; runs the tests for your app&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lint&lt;/code&gt; runs &lt;code&gt;tslint&lt;/code&gt; for your code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  tsconfig.json &amp;amp; tslint.json
&lt;/h3&gt;

&lt;p&gt;Configuration file for TypeScript and linting rules. Not much to say, pretty standard files...&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;"compilerOptions"&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;"module"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"commonjs"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"esModuleInterop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"strict"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"baseUrl"&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;"outDir"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dist"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"removeComments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"experimentalDecorators"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"emitDecoratorMetadata"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"moduleResolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"importHelpers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"types"&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="s2"&gt;"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="nl"&gt;"typeRoots"&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="s2"&gt;"node_modules/@types"&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;"typedocOptions"&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;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"modules"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"out"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"docs"&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;"include"&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="s2"&gt;"./src/**/*.ts"&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;And...&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;"extends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tslint:recommended"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"rules"&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;"max-line-length"&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;"options"&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="mi"&gt;100&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;"member-ordering"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"no-consecutive-blank-lines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"object-literal-sort-keys"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ordered-imports"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"quotemark"&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"single"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"variable-name"&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"allow-leading-underscore"&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;Let's move to our app...&lt;/p&gt;

&lt;h3&gt;
  
  
  The server
&lt;/h3&gt;

&lt;p&gt;Our app entry point will be &lt;code&gt;src/start.ts&lt;/code&gt; as you can see from &lt;code&gt;util/nodemon.json&lt;/code&gt; (check the &lt;code&gt;start-dev&lt;/code&gt; in the &lt;code&gt;scripts&lt;/code&gt; section of our &lt;code&gt;package.json&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The script simply includes our &lt;code&gt;ApiServer&lt;/code&gt; class which will setup our controllers on the routes configured using OvernightJS. OvernightJS makes this super simple, just a loop on the controllers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * Adds controllers to the application
 * by looping on the imported classes
 */&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;setupControllers&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="k"&gt;void&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;ctlrInstances&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="k"&gt;for &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;name&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;controllers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;controllers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&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;controller&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;controllers&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
            &lt;span class="nx"&gt;ctlrInstances&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="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;controller&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="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addControllers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctlrInstances&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;h3&gt;
  
  
  The controllers
&lt;/h3&gt;

&lt;p&gt;Let's see how OvernightJS makes easy for us to configure our application controllers: first of all let's define a class...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * @class ApiController
 * is the class managing endpoints for our API
 */&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Controller&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&lt;/span&gt;&lt;span class="dl"&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;class&lt;/span&gt; &lt;span class="nc"&gt;ApiController&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;code&gt;/api&lt;/code&gt; (check the &lt;code&gt;@Controller&lt;/code&gt; annotation) will be the "root" of our URL. Each method of this class will have its own route...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * It should return the Current Weather Forecast given a city as input among three
 * @param req
 * @param res
 */&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&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;weather/:city/current&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="nd"&gt;Middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;cityValidatorMiddleware&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;getCurrentWeather&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;Request&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="nx"&gt;Response&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;weather&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="nx"&gt;weather&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;owm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCurrentWeather&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;params&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="k"&gt;return&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;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;currentWeather&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="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="k"&gt;return&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;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;InternalServerError&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We're adding &lt;code&gt;@Get&lt;/code&gt; annotation to define a &lt;code&gt;GET&lt;/code&gt; route with the &lt;code&gt;weather/:city/current&lt;/code&gt; path and a &lt;code&gt;@Middleware&lt;/code&gt; to validate our request (we only serve three cities, do you remember?).&lt;/p&gt;

&lt;p&gt;The method itself is pretty simple: we call the &lt;code&gt;getCurrentWeather()&lt;/code&gt; method in the &lt;code&gt;src/openweathermap/OpenWeatherMapApiClient.ts&lt;/code&gt; class and return the result as a JSON object.&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;"currentWeather"&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;"cityName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Amsterdam"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"cityWeather"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Clear, clear sky"&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;The api will answer at the &lt;a href="http://localhost:4000/api/weather/amsterdam/current" rel="noopener noreferrer"&gt;http://localhost:4000/api/weather/amsterdam/current&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using OvernightJS will allow you to define your routes in a super easy way, and inside your controllers, closer to your actual code. To me it's more clear than the classic "Express way":&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;// GET method route&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;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;/&lt;/span&gt;&lt;span class="dl"&gt;'&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="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="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;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET request to the homepage&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="c1"&gt;// POST method route&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;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&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="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="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;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST request to the homepage&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;h3&gt;
  
  
  Recap
&lt;/h3&gt;

&lt;p&gt;Here's a little recap, useful if you just want to download and run the code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The three allowed cities are &lt;code&gt;Madrid&lt;/code&gt;, &lt;code&gt;Stockholm&lt;/code&gt;, &lt;code&gt;Amsterdam&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run tests with &lt;code&gt;npm run test&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The project is using &lt;a href="https://github.com/seanpmaxwell/overnight" rel="noopener noreferrer"&gt;OvernightJS&lt;/a&gt;, a simple library to add TypeScript decorators for methods meant to call Express routes. It also includes a package for printing logs.&lt;/li&gt;
&lt;li&gt;You can generate TypeDoc documentation by running &lt;code&gt;npm run docs&lt;/code&gt;, the documentation will be stored in the &lt;code&gt;docs&lt;/code&gt; folder.&lt;/li&gt;
&lt;li&gt;The project is using &lt;a href="https://www.npmjs.com/package/dotenv-safe" rel="noopener noreferrer"&gt;dotenv-safe&lt;/a&gt; for env. configuration. See &lt;code&gt;.env.example&lt;/code&gt; for details.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ok, we're done. Check the full code here: &lt;a href="https://github.com/napolux/weather-api-typescript" rel="noopener noreferrer"&gt;https://github.com/napolux/weather-api-typescript&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code itself is over-commented&lt;/strong&gt;, so you should not have any problem in following the code flow. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you have any question just get in touch!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>node</category>
      <category>overnightjs</category>
    </item>
    <item>
      <title>Some tips from when you work from home </title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Tue, 10 Mar 2020 18:05:12 +0000</pubDate>
      <link>https://forem.com/napolux/some-tips-from-when-you-work-from-home-1g2l</link>
      <guid>https://forem.com/napolux/some-tips-from-when-you-work-from-home-1g2l</guid>
      <description>&lt;p&gt;Here are some tricks for the occasional "work from home": many of us are working from home right now due to the coronavirus flu and I'd like to share what I've learnt in these years of constant (but not full) work from home.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maybe they can be applied also to freelancers&lt;/strong&gt;, but they are more used to work from home and they get their working routine very early...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Respect the usual morning routine&lt;/strong&gt;: shower, brush your teeth…&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dress casual if you want&lt;/strong&gt;, but dress yourself (no pajamas) and always put your shoes on (this tricks your mind into thinking you’re not home for "lazyness")&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wake up at the same time you wake up when you go to the office&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do your laundry, bed, etc... BEFORE actually start working&lt;/strong&gt; (avoid housing distractions!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find a silent spot in your home away from kids&lt;/strong&gt;, if you have any. Discard this if you have to watch for your kids while working from home (you’re my hero in this case)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Take your time&lt;/strong&gt;. If you are used to get a coffee around 11am in the office, do the same at home&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lunch break of 1 hour? Make a 1 hour break&lt;/strong&gt;. Usually eating at your desk? Do a speed lunch even at home.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If you usually leave the office at 6pm, stop working at 6pm&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you need Internet connection stop every torrent&lt;/strong&gt;/heavy download you may have on your own network&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the VPN&lt;/strong&gt; (or whatever connection you use) the night before (or better, some time in advance) in order to be ready in case of problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NO TV!&lt;/strong&gt; (just put some music on if you feel bored)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do some little walk around the house&lt;/strong&gt; every hour&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drink plenty of water&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>smartworking</category>
      <category>remoteworking</category>
      <category>coronavirus</category>
      <category>virus</category>
    </item>
    <item>
      <title>How to find the perfect solution</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Fri, 28 Feb 2020 15:14:51 +0000</pubDate>
      <link>https://forem.com/napo/how-to-find-the-perfect-solution-23mc</link>
      <guid>https://forem.com/napo/how-to-find-the-perfect-solution-23mc</guid>
      <description>&lt;p&gt;Let's say you have a huge programming problem to solve. This is one of the approaches I’ve found to work.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You spend hours scouring Google, StackOverflow and some obscure tutorials&lt;/li&gt;
&lt;li&gt;You try tons of approaches, none of which work&lt;/li&gt;
&lt;li&gt;PANIC&lt;/li&gt;
&lt;li&gt;Defeated, you try to explain it to a colleague in search for help&lt;/li&gt;
&lt;li&gt;You suddenly find the perfect solution while you explain the problem to your colleague&lt;/li&gt;
&lt;li&gt;You go back to your desk and solve your problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve found solutions to my problems this way more times than I’d like to admit. &lt;/p&gt;

&lt;p&gt;That's the power of &lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging" rel="noopener noreferrer"&gt;rubber duck debugging&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
    <item>
      <title>Let's go remote!</title>
      <dc:creator>Francesco Napoletano</dc:creator>
      <pubDate>Mon, 20 May 2019 19:10:19 +0000</pubDate>
      <link>https://forem.com/napo/let-s-go-remote-1n3</link>
      <guid>https://forem.com/napo/let-s-go-remote-1n3</guid>
      <description>&lt;p&gt;I've recently moved to a new position as Full Stack Software Engineer for a cool tech company in Italy, my home country. &lt;strong&gt;I'm super happy with my new job&lt;/strong&gt; (a really exciting environment, super cool technology, wonderful colleagues, a solid business, a shiny office full of amenities, 2 days of smartworking per week, etc...) &lt;/p&gt;

&lt;p&gt;While looking for this new job, I took the chance to think about the job market for programmers. &lt;strong&gt;We're very lucky compared to other jobs&lt;/strong&gt; and the demand for programmers is hitting an all-time high. But...&lt;/p&gt;

&lt;p&gt;But... &lt;strong&gt;There's still something really old in our job&lt;/strong&gt;. Most of us are still stuck to a 9-5 (plus commuting) routine.&lt;/p&gt;

&lt;p&gt;I spend 2 hours per day commuting. Sometimes, it takes 3 (train delays, strikes, etc...). Let' do a little math.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 hours per day&lt;/li&gt;
&lt;li&gt;10 hours per week&lt;/li&gt;
&lt;li&gt;40+ hours per month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not only about commuting. It's about what I need for my job. Let's face it: offices are cool, but &lt;strong&gt;I just need a computer and a fast Internet connection&lt;/strong&gt; for 100% of my duties. &lt;/p&gt;

&lt;p&gt;If I want to talk to my colleagues I can call, slack, email them whenever I need. &lt;strong&gt;Collaboration over the Internet has never been easier&lt;/strong&gt;: I can share documents, presentations, code with just a couple of clicks.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.remoteonly.org/" rel="noopener noreferrer"&gt;Remote Only Manifesto&lt;/a&gt; should be applied by every "IT" company, &lt;strong&gt;and it's time for us (programmers, devops, IT managers, etc...) to push for this change&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'll try to do my part and from now on&lt;/strong&gt;, so, this will be my standard reply to recruiters getting in touch with me on LinkedIn (and elsewhere):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hello, $recruiter,&lt;br&gt;
I'm not actively looking for a job right now, but in the future I will only evaluate 100% remote positions. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I said... I love my new job, &lt;strong&gt;but I'm 100% sure my next job will be remote&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Share this (and many more articles about remote working) using the hashtag &lt;a href="https://twitter.com/hashtag/letsgoremote" rel="noopener noreferrer"&gt;#letsgoremote&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Let's go remote!
&lt;/h1&gt;

&lt;p&gt;This post originally appeared on &lt;a href="https://coding.napolux.com" rel="noopener noreferrer"&gt;https://coding.napolux.com&lt;/a&gt;, but was brought to dev.to for your reading pleasure ❤&lt;/p&gt;

</description>
      <category>remoteworking</category>
      <category>remote</category>
      <category>remotejobs</category>
    </item>
  </channel>
</rss>
