<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nodejs on egig.github.io</title><link>https://egig.github.io/blog/nodejs/</link><description>Recent content in Nodejs on egig.github.io</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 17 Aug 2019 10:00:00 +0000</lastBuildDate><atom:link href="https://egig.github.io/blog/nodejs/index.xml" rel="self" type="application/rss+xml"/><item><title>Subdomain Based NodeJS App with NGINX</title><link>https://egig.github.io/subdomain-based-nodejs-app-with-nginx/</link><pubDate>Sat, 17 Aug 2019 10:00:00 +0000</pubDate><guid>https://egig.github.io/subdomain-based-nodejs-app-with-nginx/</guid><description>&lt;p&gt;This is part of my pet projects. I need to create web app which the state is depends on the subdomain. Similar with wordpress or blogspot blog. e.g mysite.wordpress.com or mysite.blogspot.com. This is how I do it.&lt;/p&gt;&#10;&lt;p&gt;So in NGINX, we can create vhost a.k.a server block and map the server name by wildcard. So to point any subdomain of certain domain to our server, we can do something like this.&lt;/p&gt;</description></item><item><title>Refactor Loopback 2.0 Directory Structure to Custom Expressjs</title><link>https://egig.github.io/refactor-loopback-directory-structure-to-custom-expressjs/</link><pubDate>Sun, 24 Mar 2019 10:10:00 +0000</pubDate><guid>https://egig.github.io/refactor-loopback-directory-structure-to-custom-expressjs/</guid><description>&lt;p&gt;The challange is to keep eveerythings fine, not break single thing while we do change things to be like what we need. I know there is some best practice already &lt;a href="https://github.com/i0natan/nodebestpractices"&gt;out there&lt;/a&gt;. This is only documentary notes. Who knows I need this again in the future.&lt;/p&gt;&#10;&lt;p&gt;We was using loopback 2.0 to initiate some projects, my previous developer choose it. I don&amp;rsquo;t know why. But then I feel loopback does not suit our current state, So, I think I want to change to just use expressjs. Fortunately loopback 2.0 is based on Expressjs so its possible to refactor the structure.&lt;/p&gt;</description></item><item><title>How Do I Write Javascript Config File</title><link>https://egig.github.io/how-do-i-write-javascript-config-file/</link><pubDate>Fri, 24 Nov 2017 07:06:46 +0000</pubDate><guid>https://egig.github.io/how-do-i-write-javascript-config-file/</guid><description>&lt;p&gt;Hampir setiap kali kita membangun aplikasi, kita membutuhkan file konfigurasi. File konfigurasi untuk menyimpan data yang &lt;em&gt;configurable&lt;/em&gt; disesuaikan dengan &lt;em&gt;environment&lt;/em&gt; aplikasi. Contoh data koneksi database, data &lt;em&gt;credential&lt;/em&gt; API dan sebagainya. Berbeda orang atau tim, maka berbeda pula format file konfigurasi nya.&lt;/p&gt;</description></item><item><title>Handle Error di Promise.catch()</title><link>https://egig.github.io/handle-error-di-promise-catch/</link><pubDate>Sun, 03 Sep 2017 17:43:37 +0000</pubDate><guid>https://egig.github.io/handle-error-di-promise-catch/</guid><description>&lt;p&gt;Baru sempat baca lebih lanjut tentang error handling di Promise Javascript. Agak ketinggalan sih, karena ini masalah sudah ada dari 2 tahun-an lalu, tapi gak apa, baru fokus ke Javascript setahun terakhir, dan anyway agak susah juga cari artikel yang bahas ini pake Bahasa Indonesia jadi saya tulis aja disini.&lt;/p&gt;</description></item></channel></rss>