<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[HOTS]]></title><description><![CDATA[A blog where developers learn, share, and stay up-to-date. Read the latest news and articles on digital technology and transformation!]]></description><link>http://localhost:18093/</link><image><url>http://localhost:18093/favicon.png</url><title>HOTS</title><link>http://localhost:18093/</link></image><generator>Ghost 2.9</generator><lastBuildDate>Tue, 14 Dec 2021 00:15:12 GMT</lastBuildDate><atom:link href="http://localhost:18093/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Top Web Frameworks To Host Your Website]]></title><description><![CDATA[In the current era of globalization, technology is an undeniable part of our
daily life. Technology develops from time to time to give us the opportunity to
grow and to learn in order to nurture the welfare of mankind. Nowadays, there
are many web development frameworks available for helping us up-to-date with the
latest trends of technology. People use technology such as websites for many
different purposes. They use it for selling their products, to communicate with
others, to search for infor]]></description><link>http://localhost:18093/top-web-frameworks-to-host-your-website/</link><guid isPermaLink="false">Ghost__Post__6103e64cbe9ea8000137c285</guid><category><![CDATA[web framework]]></category><category><![CDATA[web servers]]></category><category><![CDATA[web development]]></category><category><![CDATA[tools]]></category><category><![CDATA[nodejs]]></category><category><![CDATA[python]]></category><category><![CDATA[asp.net]]></category><dc:creator><![CDATA[Hadi]]></dc:creator><pubDate>Sat, 21 Aug 2021 16:40:58 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/web-framework.png" medium="image"/><content:encoded><![CDATA[<img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/web-framework.png" alt="Top Web Frameworks To Host Your Website"/><p>In the current era of globalization, technology is an undeniable part of our daily life. Technology develops from time to time to give us the opportunity to grow and to learn in order to nurture the welfare of mankind. Nowadays, there are many web development frameworks available for helping us up-to-date with the latest trends of technology. People use technology such as websites for many different purposes. They use it for selling their products, to communicate with others, to search for information, and so on. Building websites and web applications have been a trend in the community nowadays. Many developers are competing in providing the best web development services using a tool called web development framework.</p><p>A web development framework is a software platform that is designed to support the development of web applications such as web services, web resources, and web APIs. By using the framework, the development becomes much simpler and faster because web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Since most of all the web frameworks are open source which means the growth of the frameworks including the development resources and enhancement will be driven by following the latest trends of technology. Web frameworks aim to automate the overhead associated with common activities performed such as libraries for databases, framework templates, session management, and even code reuse. Mostly they target the development of dynamic websites but are also applicable to static websites.</p><h2 id="django"><strong><a href="https://www.djangoproject.com/">Django</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/django.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="1189" height="534"><figcaption>django framework (source: djangoproject.com)</figcaption></img></figure><p>It was first created in 2005 by Adrian Holovaty and Simon Willison and since the leap of Python's popularity then directly affected the application of Django itself.<br>Django is a Python-based web framework that follows the model-template-views (MTV) architectural pattern. Django makes web development fast with less code. The main idea is to ease the creation of complex and database-driven websites.</br></p><p>Many large and well-known corporations such as Google, Youtube, and Instagram use this open-source web development framework due to one of the key points that Django has which is its security. It allows you to build a secure website with the security features implemented in the framework itself, like code execution prevention in the template layer. The convention over configuration will also keep the developers focusing on the essential part of developing a website rather than setting each configuration.</p><p>Are you interested to try the tutorial of this server-side web framework? Go on and click <a href="https://docs.djangoproject.com/en/3.2/intro/tutorial01/">here</a>!</p><h2 id="expressjs"><strong><a href="https://expressjs.com/">Express.js</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/express.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="826" height="286"><figcaption>expressjs framework (source: expressjs.com)</figcaption></img></figure><p>Express.js, or simply Express, is a back-end application framework for Node.js and open-source software under the MIT license. It provides a robust set of features for web and mobile applications. Express.js allows you to clarify the features of Node with some core framework functionalities and also provides the robust performance of the asynchronous Node.js. It is designed as flexible to support web building applications and APIs.</p><p>The original author, TJ Holowaychuk, created  Express.js inspired by the minimalistic Web Framework Sinatra in providing similar minimalistic features available as plugins. Express.js is so popular among big names like IBM, Uber, and many other companies. You can install it <a href="https://expressjs.com/en/starter/installing.html">here</a>.</p><h2 id="angular"><strong><a href="https://angular.io/">Angular</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/angular.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="1032" height="376"><figcaption>angular framework (source: angular.io)</figcaption></img></figure><p>Angular is an open-source web application platform built on TypeScript. It is used for building scalable web applications with a component-based framework. Angular also covers a wide variety of features which makes it a well-integrated library. It is suited for developers to develop, build, test, and update their codes.</p><p>Angular is now one of the most popular and well-known web application frameworks developed by Google. From single developer projects to industry-level applications, It provides you with an advantage with a scalable platform to cover all those applications. With an easy updating process, Angular is designed to help you to manage the latest development with a minimum of effort. It takes you further at the maximum speed possible on the web platform.</p><p><a href="https://rubyonrails.org/">Ruby on Rails</a></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/ruby-on-rails.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="410" height="131"><figcaption>ruby on rails framework (source: rubyonrails.org)</figcaption></img></figure><p>Ruby on Rails, or Rails, is a server-side web application framework and open-source software written in Ruby under the MIT License. Rails is a model-view-controller (MVC) framework, providing default structures for a database, web services, and web pages. The high speed of development has been the main advantage of this framework determined by extensive RoR tools, a huge set of pre-created solutions, and simple coding.</p><p>Ruby on Rails is optimized with Convention over Configuration (CoC), don't repeat yourself (DRY), and active record pattern to make it easier for developers to develop web applications. There is also the statement "Optimizing for programmer happiness". Many big and popular companies use Ruby on Rails for their websites such as GitHub, Shopify, Airbnb, Twitch, SoundCloud, Hulu, and so on. Want to learn more about Ruby on Rails? You can click <a href="https://guides.rubyonrails.org/">here</a>!</p><h2 id="react"><strong><a href="https://reactjs.org/">React</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/create-react-app-1.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="512" height="266"><figcaption>react framework (source: reactjs.org)</figcaption></img></figure><p>React is actually an open-source, front-end, JavaScript library but developers treat it and compare it as a framework instead. It is for building user interfaces or UI components. React uses a component-based architecture to develop simple components to complex components. It can be used to render on the server-side or client-side. React was first introduced and is maintained by Facebook. Today many big names use it such as Instagram, eBay, Yahoo, Netflix, etc.<br>You can dig deeper about React <a href="https://reactjs.org/docs/getting-started.html">here</a>.</br></p><p>Interested in Top Developer Tools for React? Check here!</p><h2 id="laravel"><strong><a href="https://laravel.com/">Laravel</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/laravel.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="1224" height="448"><figcaption>laravel framework (source: laravel.com)</figcaption></img></figure><p>If you are searching for an expressive and elegant syntax, you may want to consider learning more about Laravel. Laravel is a free, open-source PHP web framework created by Taylor Otwell initially in 2011. It is used for the development of web applications following the model-view-controller (MV) architectural pattern.</p><p>Laravel comes with API support out of the box. It also possesses a modular packaging system with a dedicated dependency manager and utilities to aid in application deployment and maintenance. Not like Django or Express, Laravel might be a drawback for huge projects due to its performance.</p><h2 id="vue"><strong><a href="https://vuejs.org/">Vue</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/vue.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="908" height="303"><figcaption>vue framework (source: vuejs.org)</figcaption></img></figure><p>Vue.js (commonly referred to as Vue; pronounced /vjuː/, like "view") is an open-source framework for building user interfaces. It adopts a model-view-view-model front-end JavaScript framework to build single-page applications. It has some interesting features on Vue. Unlike other monolithic frameworks, Vue is designed to be incrementally adoptable which means you can adopt Vue for one portion of your existing projects. Vue was first created by Evan You and first released in 2014.</p><p>If you already know about HTML, CCS, JavaScript, it is a good choice to dig into Vue.</p><h2 id="flask"><strong><a href="https://flask.palletsprojects.com/en/1.1.x/">Flask</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/flask.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="668" height="184"><figcaption>flask framework (source: flask.palletsprojects.com)</figcaption></img></figure><p>The initial intention is to build a small core and easy to extend web framework. Flask is a micro web framework written in Python. It is a microframework because it has no particular tools or libraries such as database abstraction layer, validation form, any other pre-existing third-party libraries that provide common functions. Flask is designed to scale up complex applications to make a quick and easy getting started.</p><p>It was first developed by Armin Ronacher in 2010. Now it has become a popular microframework among developers. Flask gives liberty to developers for choosing the tools and libraries they want to use since it doesn't impose any dependencies or project layouts.</p><h2 id="spring"><a href="https://spring.io/">Spring</a></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/spring.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="719" height="308"><figcaption>spring framework (source: spring.io)</figcaption></img></figure><p>The Spring Framework is an open-source application framework and inversion of the control container for the Java platform. It adopts a model-view-controller (MVC) framework. It delivers production-grade features for developers to use many extensions for creating web apps based on the Java EE platform. Spring Framework is a framework for fast, secure, and responsive web applications connected to any data store.</p><h2 id="meteor"><strong><a href="https://www.meteor.com/">Meteor</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/meteor.png" class="kg-image" alt="Top Web Frameworks To Host Your Website" loading="lazy" width="1379" height="455"><figcaption>meteor framework (source: meteor.com)</figcaption></img></figure><p>Meteor, or MeteorJS, is a free and open-source isomorphic JavaScript web framework using Node.js. It provides cross-platform (Android, iOS, Web) and rapid prototyping code. On the client, Meteor can be used with Vue, React, Svelte, Angular, Blaze, or any popular front-end JavaScript framework. Meteor provides a set of technologies for building connected-client reactive applications, tools, a set of packages from Node.js, etc.</p><h2 id="conclusion"><strong>Conclusion</strong></h2><p>And that's the list of our version for the website development frameworks which is happening today. All of them offer great services, great tools, and of course great performance. And if you’re a developer trying to develop yourself with the most up-to-date frameworks, you can cherry-pick from the list which one you want to equip yourself with.</p><p>Do you have your own choice of website development framework? Give feedback below and let’s discuss more!</p>]]></content:encoded></item><item><title><![CDATA[Top 7 Coding Challenges]]></title><description><![CDATA[As technology develops, so does the number of software engineers or developers.
Many software engineers or developers strive to be the best coder. They try to
prove themselves in so many ways and one of them is the coding challenge. Many
software engineers or developers use coding challenges not only to test their
coding skills and algorithms in solving the use case problem but also to improve
their skills. The challenges provide a variety of problems across different
difficulties and coding pra]]></description><link>http://localhost:18093/top-7-coding-challenges/</link><guid isPermaLink="false">Ghost__Post__6103f59dbe9ea8000137c3bb</guid><category><![CDATA[coding]]></category><category><![CDATA[competition]]></category><category><![CDATA[challenge]]></category><category><![CDATA[developer]]></category><dc:creator><![CDATA[Hadi]]></dc:creator><pubDate>Sat, 21 Aug 2021 16:40:47 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/coding-challenges.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/coding-challenges.jpg" alt="Top 7 Coding Challenges"/><p>As technology develops, so does the number of software engineers or developers. Many software engineers or developers strive to be the best coder. They try to prove themselves in so many ways and one of them is the coding challenge. Many software engineers or developers use coding challenges not only to test their coding skills and algorithms in solving the use case problem but also to improve their skills. The challenges provide a variety of problems across different difficulties and coding practices such as recursing, querying, manipulating, etc. When solving a problem, a developer needs to pay attention to the time consumed by the code to make sure it is a solid solution. By doing coding challenges, they also develop and practice their skills to get better.</p><p>Nowadays many job recruiters tend to use coding challenges to test developers when they apply for a job. To see whether the applicants are up for the challenges in their future job is one of many reasons for the recruiters to use coding challenges. So doing coding challenges can be very essential in enhancing your career as a software engineer or developer. Many competitions are also held for developers to compete with others to win rewards from the coding challenge platforms.</p><h2 id="hackerrank"><strong><a href="https://www.hackerrank.com/">HackerRank</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/hackerrank_logo.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="1600" height="401"><figcaption>hackerrank logo (source: github.com)</figcaption></img></figure><p>HackerRank is one of the leading platforms for competitive programming challenges that use several different domains such as algorithms, mathematics, SQL, functional programming, AI, etc. HackerRank is more suitable for intermediate-to-advanced programmers who already know a language basic and are ready for more complicated problems. A variety of programming languages such as C, Java, Python, Ruby, etc are available for developers to use in solving the challenges. HackerRank also provides developers with a massive collection of coding challenges adjusted with algorithms and data structures, along with a discussion board and a list of top user solutions. Developers can also submit applications and apply for jobs by solving coding challenges provided by sponsored companies. If you are interested in this coding challenge, you can click <a href="https://www.hackerrank.com/">here</a>.</p><h2 id="topcoder"><strong><a href="https://www.topcoder.com/">TopCoder</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/topcoder_new_logo-300x156.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="300" height="156"><figcaption>topcoder logo (source: topcoder.com)</figcaption></img></figure><p>TopCoder is actually a company with an open global community of designers, developers, data scientists, and competitive programmers. TopCoder runs regular competitive programming challenges, known as Single Round Matches where developers compete against others to solve challenges. And the best score with the best solution wins a cash prize from corporate sponsors. Founded in 2001 by Jack Hughes, TopCoder also provides algorithm challenges solving advanced topics like graph search and number theory for advanced developers.</p><h2 id="coderbyte"><strong><a href="https://coderbyte.com/">CoderByte</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/coderbyte_logo_digital_multi_light.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="1200" height="322"><figcaption>coderbyte logo (source: coderbyte.com)</figcaption></img></figure><p>Coderbyte is a web application that helps you to practice and improve your coding skills. Coderbyte provides a variety of coding challenges that developers can solve directly online. The challenges range from easy to difficult which makes it suitable for all levels of programming. By using Coderbyte, developers can also view other users' solutions for any challenge apart from the solutions already given by Coderbyte.</p><p>They also offer a collection of code challenges, web development courses, and interview preparation courses that can help you improve your career as a developer in these modern technology days. And if you have a business to run, they also provide you with a technical screening product as well which can help you recruit top talents more accurately.</p><h2 id="codingame"><strong><a href="https://www.codingame.com/">CodinGame</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/codingame-logo.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="1024" height="177"><figcaption>codingame logo (source: logonoid.com)</figcaption></img></figure><p>If you are looking for a new way to improve your programming skills while having fun, CodinGame is the answer. CodinGame website allows you to actually play games while coding. It lets you write the code for games that you play directly online. It ranges from easy to difficult levels which makes it suitable for everyone who wants to try.</p><p>CodinGame is a technology company that offers an online editing platform for developers. It allows developers to explore programming by solving difficult puzzles, learning to code better with an online programming application supporting 20+ programming languages, and also competing in multiplayer programming contests including timed artificial intelligence or code-golf challenges.</p><h2 id="leetcode"><strong><a href="https://leetcode.com/">LeetCode</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/leetcode_button_icon_151892.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="512" height="130"><figcaption>leetcode logo (source: icon-icons.com)</figcaption></img></figure><p>LeetCode is a platform to help you enhance your programming skills by providing various coding challenges. The challenges offer weekly and biweekly programming competitions with a general duration of 90 minutes. They have their own online editor called Playground where developers compete to solve the challenges. LeetCode is best suited for intermediate-to-advanced programmers who already know the fundamentals of code writing.</p><p>LeetCode also offers technical preparation for candidates up for job interviews. For companies, LeetCode helps them to identify top technical talents by sponsoring contests, providing online assessments, and any other business service.</p><h2 id="codechef"><strong><a href="https://www.codechef.com/">CodeChef</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/codechef_button_icon_151902.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="512" height="119"><figcaption>codechef logo (source: icon-icons.com)</figcaption></img></figure><p>CodeChef is an Indian-based non-profit educational organization that provides challenges for aspiring programmers to practice and sharpen their programming skills. CodeChef is a place for a competitive programming community of programmers from across the globe that contribute to the forums, write tutorials, and take part in coding competitions.</p><p>CodeChef holds a programming competition every month and developers can submit their solutions through an online editor support tool in over 55+ programming languages such as C, C++, Java, Python, etc. And if you are looking for various algorithm tutorials and forum discussions, CodeChef is what you are looking for.</p><h2 id="codewars"><strong><a href="https://www.codewars.com/">Codewars</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/codewars_button_icon_151901.png" class="kg-image" alt="Top 7 Coding Challenges" loading="lazy" width="512" height="130"><figcaption>codewars logo (source: icon-icons.com)</figcaption></img></figure><p>CodeWars is an educational community that provides a platform for programming exercises. It is great for beginner-to-intermediate developers in training different types of coding challenges. The community provides a collection of coding challenges for developers to solve directly online using one of the 20+ programming languages.</p><p>In Codewars, software engineers or developers will face a large collection of coding challenges. Developers can challenge themselves on programming challenges called kata to sharpen different skills, master their own language of choice, or even expand into a new one. They compete in various difficulty levels to earn a higher ranking. The ranking is determined by the points called the kyu in solving problems.</p><h2 id="conclusion"><strong>Conclusion</strong></h2><p>Programming takes a lot of time and effort. To sharpen your skills and improve yourself are things that you want to do as a developer. Participating in competitive programming contests will help you develop and be a stepping stone for your career in the world of technology. We compile these top best coding challenges based on multiple sources from <a href="https://www.freecodecamp.org/news/the-10-most-popular-coding-challenge-websites-of-2016-fb8a5672d22f/">Freecodecamp.org</a>, <a href="https://medium.com/coderbyte/the-best-coding-challenge-websites-in-2020-2e39f71cf488">Medium.com by Daniel Borowski</a>, <a href="https://www.geeksforgeeks.org/7-best-coding-challenge-websites-in-2020/">Geeksforgeeks.com</a>, <a href="https://dev.to/haycuoilennao19/10-coding-challenge-websites-for-developer-898">Dev.to</a> and our team come up with these top 7. If your coding challenges platform is not on this list and you think it should be there, comment below to let us know.</p>]]></content:encoded></item><item><title><![CDATA[Deploy React App using Firebase Hosting]]></title><description><![CDATA[
--------------------------------------------------------------------------------

In this tutorial, I will share how to deploy React Application using Firebase
Hosting. First of all, make sure that you already have React Application
project. If not you can follow this tutorial [https://hots.ro2.page/fi/]. 

Install Firebase tools and login to Firebase
Next step, go to your React Application project directory and inside the
directory, you will need to install the firebase tools using:

npm insta]]></description><link>http://localhost:18093/deploy-react-app-using-firebase-hosting/</link><guid isPermaLink="false">Ghost__Post__610990f1be9ea8000137c7b2</guid><category><![CDATA[coding]]></category><category><![CDATA[developer]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[nodejs]]></category><category><![CDATA[javascript]]></category><category><![CDATA[open source]]></category><category><![CDATA[react]]></category><category><![CDATA[web development]]></category><category><![CDATA[web framework]]></category><category><![CDATA[typescript]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Tue, 03 Aug 2021 19:28:38 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/react_firebase.png" medium="image"/><content:encoded><![CDATA[<hr><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/react_firebase.png" alt="Deploy React App using Firebase Hosting"/><p>In this tutorial, I will share how to deploy React Application using Firebase Hosting. First of all, make sure that you already have React Application project. If not you can follow <a href="https://hots.ro2.page/fi/">this tutorial</a>. </p><h2 id="install-firebase-tools-and-login-to-firebase">Install Firebase tools and login to Firebase</h2><p>Next step, go to your React Application project directory and inside the directory, you will need to install the firebase tools using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm install firebase-tools -g</div>
<!--kg-card-end: html--><p>And then after that login into Firebase using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase login</div>
<!--kg-card-end: html--><h2 id="initialize-firebase-for-react-application">Initialize Firebase for React Application</h2><p>After installing the Firebase tools and login into Firebase, proceed to initialize the Firebase inside your React Application project by using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase init</div>
<!--kg-card-end: html--><p>You will get some questions and choices in the process, just follow the steps below:</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.11.43.png" class="kg-image" alt="Deploy React App using Firebase Hosting" loading="lazy" width="1736" height="718"/></figure><p>Choose <strong><strong>Hosting: Configure and deploy Firebase Hosting sites.</strong></strong></p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/1_Rdcb0b-7PU7A69Ezd9hIaw.png" class="kg-image" alt="Deploy React App using Firebase Hosting" loading="lazy" width="1400" height="327"/></figure><p>Choose <strong>Use and existing project </strong>and then choose your firebase project.</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.18.55.png" class="kg-image" alt="Deploy React App using Firebase Hosting" loading="lazy" width="1136" height="394"/></figure><p>Follow all the answers like what I did in the screenshot above. You can answer differently if you really know what you are doing.</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-04-at-02.19.02.png" class="kg-image" alt="Deploy React App using Firebase Hosting" loading="lazy" width="720" height="132"/></figure><p>Now that you have successfully initialized firebase in your React application, inside firebase.json make sure that it looks like the following:</p><pre><code class="language-sh">{
  "hosting": {
    "public": "build",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}</code></pre><h2 id="deploying-your-react-application-to-firebase-hosting">Deploying your React Application to Firebase Hosting</h2><p>Now all you have to do is deploy your React Application into Firebase Hosting using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase deploy</div>
<!--kg-card-end: html--><p>Firebase will give you a unique URL where your deployed React Application is hosted on. That is all, congratulations! You have successfully deployed your React Application using simple and secure (securely hosted using HTTPS) Firebase hosting. If you want to learn how to create Firebase Cloud Function you can follow the tutorial <a href="https://hots.ro2.page/setup-firebase-cloud-functions-with-react-project/">here</a>.</p></hr>]]></content:encoded></item><item><title><![CDATA[Introduction to Sanity.io]]></title><description><![CDATA[> Sanity.io is the platform for structured content. With Sanity.io you can manage
your text, images, and other media with APIs. You can also use the open-source
single page application Sanity Studio to quickly set up an editing environment
that you can customize. With Sanity.io you have access to a bunch of APIs,
libraries, and tooling that helps you leverage the benefits of having all your
content available as a single source of truth.

– sanity.io [https://www.sanity.io/docs/a-short-introducti]]></description><link>http://localhost:18093/introduction-to-sanity-cms/</link><guid isPermaLink="false">Ghost__Post__6108f923be9ea8000137c5d1</guid><category><![CDATA[web development]]></category><category><![CDATA[javascript]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[cms]]></category><category><![CDATA[content management system]]></category><dc:creator><![CDATA[Kevin Nursalim]]></dc:creator><pubDate>Tue, 03 Aug 2021 11:00:00 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/logo-1-.png" medium="image"/><content:encoded><![CDATA[<blockquote>Sanity.io is the platform for structured content. With Sanity.io you can manage your text, images, and other media with APIs. You can also use the open-source single page application Sanity Studio to quickly set up an editing environment that you can customize. With Sanity.io you have access to a bunch of APIs, libraries, and tooling that helps you leverage the benefits of having all your content available as a single source of truth.<br><br>– <a href="https://www.sanity.io/docs/a-short-introduction-to-sanity-io">sanity.io</a></br></br></blockquote><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/logo-1-.png" alt="Introduction to Sanity.io"/><p>This article will serve as a guide which outlines how to create a working Sanity project, a headless CMS.</p><h2 id="pre-requisites">Pre-requisites</h2><ul><li>NodeJS</li></ul><h2 id="before-starting">Before Starting</h2><p>Register for a free-tier account on <a href="https://www.sanity.io/">sanity.io</a> to try it out. The account will be used for the project initialization, although it is also possible to register through the instructions from running <code>sanity init</code>. Sanity gives an option to register with Google, GitHub, or by email and password at <a href="https://accounts.sanity.io/signup/">https://accounts.sanity.io/signup/</a>.</p><h2 id="installing-and-setup">Installing and Setup</h2><p>Simply execute the following commands as also shown in Sanity's website and guides. It installs sanity CLI globally through <code>npm</code> and then runs <code>sanity init</code> to start setting up the project.</p><pre><code class="language-shell">npm i -g @sanity/cli
sanity init</code></pre><p>After following the instructions and initialization is complete, go into the Sanity project's directory and run <code>sanity start</code> to start a local development server of Sanity Studio. The program should output the location of the server for browser access, which is usually at <code>http://localhost:3333</code>.</p><h2 id="schemas">Schemas</h2><p>The main focus of Sanity development is about schemas. Schemas defines how the data should be inputted. By default, the initialization of Sanity project generates a file named <code>schema.js</code> which should contain an example schema. A minimal Schema looks like this: </p><figure class="kg-card kg-code-card"><pre><code class="language-javascript">import createSchema from 'part:@sanity/base/schema-creator'
import schemaTypes from 'all:part:@sanity/base/schema-type'

export default createSchema({
  name: 'default',
  types: schemaTypes.concat([
    // Add your own types here
    {
      title: "My Example Document Type",
      name: "exampleDocumentType",
      type: "document",
      fields: [
        {
          title: "Greeting",
          name: "greeting",
          type: "string"
        }
      ]
    }
  ])
})</code></pre><figcaption>Minimal <code>schema.js</code> Content</figcaption></figure><p>This schema enables us to input a document with one text field named <code>greeting</code> in Sanity Studio.</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/image.png" class="kg-image" alt="Introduction to Sanity.io" loading="lazy" width="1228" height="1213"/></figure><p>Though, for actual project implementations, it might require the document to have various fields or even multiple schemas with a different set of fields. More on Schemas here: <a href="https://www.sanity.io/docs/schema-types">https://www.sanity.io/docs/schema-types</a></p><h2 id="graphql-api">GraphQL API</h2><p>Sanity, being a headless CMS, is basically just the back-end of a web app. So in order to make a full-fledged web app there should be a front-end to pull the data from Sanity. One convenient method of that is by using Sanity's GraphQL API feature. To use the GraphQL API, it must be deployed with the following command:</p><pre><code class="language-shell">sanity graphql deploy</code></pre><p>Sanity will then automatically create GraphQL schemas and then deploy it to Sanity's hosted services. The command also gives an option to enable <a href="https://github.com/graphql/graphql-playground">GraphQL Playground</a> or not, which can be useful for development.</p><p>The GraphQL API endpoint has the following structure:</p><pre><code>https://&lt;yourProjectId&gt;.api.sanity.io/v1/graphql/&lt;dataset&gt;/&lt;tag&gt;</code></pre><p>And then there's a CDN version of this API:</p><pre><code>https://&lt;yourProjectId&gt;.apicdn.sanity.io/v1/graphql/&lt;dataset&gt;/&lt;tag&gt;</code></pre><p>Where:</p><ul><li><code>&lt;yourProjectId&gt;</code> = The project ID found in the Sanity project management console.</li><li><code>&lt;dataset&gt;</code> = Dataset name to be queried.</li><li><code>&lt;tag&gt;</code> = The API tag, can be found from<code>sanity graphql deploy</code>output. (usually "default")</li></ul><p>The whole URL for the deployed GraphQL API is also outputted by <code>sanity graphql deploy</code> command upon deployment process finishes.</p><p>Project ID can be found on the Sanity's management dashboard (<a href="https://sanity.io/manage">https://sanity.io/manage</a>) or in the project's <code>sanity.json</code>.</p><h2 id="deployment">Deployment</h2><p>Simply run the following command to upload the developed project:</p><pre><code class="language-shell">sanity deploy</code></pre><p>This requires a hostname to be provided by Sanity Studio if it has not been assigned to the project yet. This is so it can be accessed from the Internet. </p><p>After the deployment is done, congratulations! You have created a fully working Sanity.io project!</p><h2 id="caveat">Caveat</h2><p>There are a few things that need to watch out for when developing a Sanity CMS project.</p><h3 id="dataset-sharing">Dataset Sharing</h3><p>If not specified in <code>sanity.json</code>, the dataset that's being used in development mode and production (deployed) mode is shared by default. This means any data being posted from the development server will also be visible in the production environment. To use a separate dataset, create the development-only dataset through the management console or CLI, and then specify it in the project's <code>sanity.json</code> file:</p><figure class="kg-card kg-code-card"><pre><code class="language-javascript">{
  // ... project info etc
  "api": {
    "projectId": "&lt;your_project_id&gt;",
    "dataset": "example"
  },
  "env": {
    "development": {
      "dataset": "example-dev"
    }
  },
  // ...
}
</code></pre><figcaption>sanity.json</figcaption></figure><p>Any specification in <code>env.development</code> will only be used during <code>sanity start</code> runs and not for the deployed ones. After this configuration, development runs will use <code>example-dev</code> dataset while the deployed production-mode Sanity Studio will use <code>example</code> dataset.</p><p>Reference: <a href="https://www.sanity.io/docs/sanity-json#933842c25dea">https://www.sanity.io/docs/sanity-json#933842c25dea</a></p><h3 id="graphql-deployment">GraphQL Deployment</h3><p>GraphQL changes that resulted from schema changes in development mode does not automatically get deployed. So, after finalizing changes to the schema in development mode, the GraphQL API needs to be redeployed. This is done by simply running the deployment command again:</p><pre><code>sanity graphql deploy</code></pre>]]></content:encoded></item><item><title><![CDATA[List of CMS]]></title><description><![CDATA[In this article, I want to discuss some of the CMS (Content Management Systems)
that we can find out there. Here I will discuss a list of headless CMS that I
have researched before.

Directus [https://directus.io/]
Directus is an open-source CMS that using 100% Javascript language (Vue - based)
which has a huge community especially at Github and good documentation. It also
supports Real-time GraphQL and has an intuitive admin app for non-technical
users. Directus itself was already established i]]></description><link>http://localhost:18093/list-of-cms/</link><guid isPermaLink="false">Ghost__Post__60f79710be9ea8000137bae8</guid><category><![CDATA[cms]]></category><category><![CDATA[content management system]]></category><category><![CDATA[web development]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Mon, 02 Aug 2021 14:30:55 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/cms_image.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/cms_image.jpeg" alt="List of CMS"/><p>In this article, I want to discuss some of the CMS (Content Management Systems) that we can find out there. Here I will discuss a list of headless CMS that I have researched before.</p><h2 id="directus"><a href="https://directus.io/">Directus</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-02-at-19.53.41.png" class="kg-image" alt="List of CMS" loading="lazy" width="574" height="200"/></figure><p>Directus is an open-source CMS that using 100% Javascript language (Vue - based) which has a huge community especially at Github and good documentation. It also supports Real-time GraphQL and has an intuitive admin app for non-technical users. Directus itself was already established in 2004 (17 years) and a well-maintained headless CMS. However, if you want the automatic backup and system monitoring features you need a paid subscription.</p><h2 id="prismic"><a href="https://prismic.io/">Prismic</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-02-at-20.13.44.png" class="kg-image" alt="List of CMS" loading="lazy" width="382" height="156"/></figure><p>Prismic is one of the open-source headless CMS that is compatible with a lot of frameworks such as ReactJS, Next.JS, Nuxt, Gatsby, Vue, Node.JS, PHP, and Laravel. This headless CMS also supports multi-languages and is trusted by over 4000 companies such as Netflix, Google, Digital Ocean, and many more. However, the free membership only can support 1 user and you also need a paid membership for backups and restore capabilities. </p><h2 id="kontent"><a href="https://kontent.ai/">Kontent</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-02-at-20.41.36.png" class="kg-image" alt="List of CMS" loading="lazy" width="2458" height="1002"/></figure><p>Kontent provides features that are compatible with websites, mobile, chatbots, wearables, and IoT devices. This CMS is used by big companies such as Starbucks and Oxford University. This CMS looks very promising, however, if you want to use it you need to pay for it and it has a small community in Github.</p><h2 id="contentful"><a href="https://www.contentful.com/">Contentful</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-02-at-20.55.22.png" class="kg-image" alt="List of CMS" loading="lazy" width="426" height="146"/></figure><p>Contentful is an open-source headless CMS that used Advanced caching techniques that are tightly integrated with external CDNs to deliver API payloads efficiently. This CMS support microservices and have a good learning centre. However, no database backup and monitoring feature is mentioned in this CMS.</p><h2 id="strapi"><a href="https://strapi.io/">Strapi</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-06-at-17.46.55.png" class="kg-image" alt="List of CMS" loading="lazy" width="478" height="138"/></figure><p>Strapi is a headless CMS that is very popular on Github and have extensive documentation. It also supports <a href="https://strapi.io/documentation/developer-docs/latest/development/plugins/i18n.html#installation">i18n</a> out-of-the-box. This headless CMS also seems really high customizable. However, this headless CMS only support self-hosting.</p><h2 id="netlify"><a href="https://www.netlifycms.org/">Netlify</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-06-at-18.23.55.png" class="kg-image" alt="List of CMS" loading="lazy" width="472" height="158"/></figure><p>Netlify is one of a headless CMS and also built as a Single Page React-App. This CMS is claimed to be fast, secure, and scalable in terms of a static site. Netlify CMS is editor friendly, have an intuitive workflow, and has instant access to GitHub account. This CMS also can be integrated with netlify.com which will add a lot more features. However, the documentation seems not good enough and there are some useful features that are still in beta.</p><h2 id="cockpit"><a href="https://getcockpit.com/">Cockpit</a></h2><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/08/Screen-Shot-2021-08-06-at-18.31.57.png" class="kg-image" alt="List of CMS" loading="lazy" width="358" height="128"/></figure><p>Cockpit is an open-source headless CMS which using PHP and all of the features seems to be completely free. This CMS also has a simple installation step and is easy to use. However, the documentation is still really small and there is not much information there.</p><p>So, that's all CMS that We have researched on the web. You can go to each CMS to try it out because each CMS have their own strength and weaknesses. </p>]]></content:encoded></item><item><title><![CDATA[Deploy FastApi with Docker in Mac Environment]]></title><description><![CDATA[
--------------------------------------------------------------------------------

Pre-requisites
Make sure your MacOS to be version 10.14 or higher, It's recommended that you
upgrade the MacOS to the latest one. Make sure you have at least 4 GB of RAM. If
all set, you can directly download the Docker Desktop for Mac here
[https://desktop.docker.com/mac/stable/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64]
.

Install and Run Docker Desktop
]]></description><link>http://localhost:18093/deploy-fastapi-with-docker-in-mac-environment/</link><guid isPermaLink="false">Ghost__Post__60ffe0b8be9ea8000137bf8a</guid><category><![CDATA[coding]]></category><category><![CDATA[developer]]></category><category><![CDATA[docker]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[open source]]></category><category><![CDATA[python]]></category><category><![CDATA[tools]]></category><category><![CDATA[web development]]></category><category><![CDATA[web framework]]></category><category><![CDATA[web servers]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Fri, 30 Jul 2021 08:33:35 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-15.33.01.png" medium="image"/><content:encoded><![CDATA[<hr><h2 id="pre-requisites">Pre-requisites</h2><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-15.33.01.png" alt="Deploy FastApi with Docker in Mac Environment"/><p>Make sure your MacOS to be version 10.14 or higher, It's recommended that you upgrade the MacOS to the latest one. Make sure you have at least 4 GB of RAM. If all set, you can directly download the Docker Desktop for Mac <a href="https://desktop.docker.com/mac/stable/amd64/Docker.dmg?utm_source=docker&amp;utm_medium=webreferral&amp;utm_campaign=docs-driven-download-mac-amd64">here</a>.</p><h2 id="install-and-run-docker-desktop">Install and Run Docker Desktop</h2><p>Drag and drop the Docker icon to Applications folder after you double clicked the downloaded Docker.dmg file</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-14.19.17.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="1420" height="586"/></figure><p>To start the Docker, double click the Docker.app file inside Applications folder.</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-14.20.12.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="1502" height="844"/></figure><p>Check the docker menu in the top status bar to check if Docker application is up and running.</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-14.26.04.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="260" height="38"/></figure><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-14.29.06.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="2480" height="1426"/></figure><p>Congratulation now you have already successfully installed Docker application inside your MacOS.</p><hr><h2 id="deploy-fastapi-inside-docker">Deploy FastAPI inside Docker</h2><p>First of all install the FastApi and Uvicorn using:</p><pre><code class="language-sh">pip install fastapi
pip install uvicorn[standard]</code></pre><p>After that, create your FastAPI project directory with this structure: </p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">PROJECT_NAME/app/</div>
<!--kg-card-end: html--><p>Inside the app directory create main.py file and insert these line of codes: </p><pre><code class="language-sh">from fastapi import FastAPI

app = FastAPI()


@app.get("/")
async def root():
    return {"message": "Hello World"}</code></pre><p>Next, run the live server using Uvicorn:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">uvicorn main:app --reload
</div>
<!--kg-card-end: html--><p>The result will be like this:</p><pre><code class="language-sh">INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)</code></pre><p>If you open the browser and go to http://127.0.0.1:8000/ it should appear like this:</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-15.01.47.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="1050" height="200"/></figure><p>If you go to http://127.0.0.1:8000/docs/ it will show Swagger UI for your API:</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-30-at-15.02.40.png" class="kg-image" alt="Deploy FastApi with Docker in Mac Environment" loading="lazy" width="2548" height="1440"/></figure><p>Congratulations! Now you have successfully installed FastAPI inside your machine. Now we proceed to deploy the FastAPI to the Docker app. </p><h2 id="deploy-fastapi-to-docker-application">Deploy FastAPI to Docker Application</h2><p>First of all, create Dockerfile inside your project directory and put these line of codes:</p><pre><code class="language-sh">FROM python:3.7

RUN pip install fastapi uvicorn

EXPOSE 80

COPY ./app /app

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
</code></pre><p>Your project structure now should be like this:</p><pre><code class="language-sh">.
├── app
│   └── main.py
└── Dockerfile
</code></pre><p>To run the Docker directly you can use these commands:</p><pre><code class="language-sh">docker build -t myimage .
docker run -d --name mycontainer -p 80:80 myimage</code></pre><p>If you want to run the Docker via <strong>Docker Compose </strong>you can create <strong>docker-compose.yml </strong>file inside project root directory and put:</p><pre><code class="language-sh">version: "3.8"

services:
  fastapi:
    build: "."
    ports: "8080:80"</code></pre><p>After that run:</p><pre><code class="language-sh">docker-compose up --build</code></pre><p>Congratulations! Now you have succesfully deploy FastAPI inside Docker application. If you want to learn how to develop front end application using React JS you can follow <a href="https://hots.ro2.page/fi/">this tutorial</a>.</p></hr></hr>]]></content:encoded></item><item><title><![CDATA[Setup WSL2 and Docker on Windows]]></title><description><![CDATA[Setup a development environment on Windows with WSL2 and Docker]]></description><link>http://localhost:18093/setup-wsl-and-docker-on-windows/</link><guid isPermaLink="false">Ghost__Post__610385cfbe9ea8000137bf94</guid><category><![CDATA[docker]]></category><category><![CDATA[windows]]></category><category><![CDATA[wsl]]></category><dc:creator><![CDATA[Kevin Nursalim]]></dc:creator><pubDate>Fri, 30 Jul 2021 08:00:00 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/horizontal-logo-monochromatic-white.png" medium="image"/><content:encoded><![CDATA[<h2 id="pre-requisites">Pre-requisites</h2><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/horizontal-logo-monochromatic-white.png" alt="Setup WSL2 and Docker on Windows"/><p>Windows 10, <strong>version 1903</strong> or higher.</p><h2 id="setting-up-wsl">Setting Up WSL</h2><p>There are two ways that we can use to enable WSL.</p><h3 id="the-gui-method">The GUI Method</h3><p>Open Control Panel.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/image-6.png" class="kg-image" alt="Setup WSL2 and Docker on Windows" loading="lazy" width="1125" height="634"><figcaption>Control Panel home</figcaption></img></figure><p>Click on Programs</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/image-7.png" class="kg-image" alt="Setup WSL2 and Docker on Windows" loading="lazy" width="1125" height="634"><figcaption>Control Panel -&gt; Programs</figcaption></img></figure><p>Then click on "Turn Windows features on or off".</p><p>Alternatively, the Windows Features window can be searched and launched through the start menu search.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/image-11.png" class="kg-image" alt="Setup WSL2 and Docker on Windows" loading="lazy" width="784" height="680"><figcaption>Start Menu search</figcaption></img></figure><p>Check the box for Virtual Machine Platform and Windows Subsystem for Linux.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/image-12.png" class="kg-image" alt="Setup WSL2 and Docker on Windows" loading="lazy" width="415" height="368"><figcaption>Windows Features window</figcaption></img></figure><p>Click on Ok to apply the changes.</p><h3 id="the-cli-method">The CLI Method</h3><p>Open PowerShell as Administrator and input the following commands to enable Windows Subsystem for Linux and Virtual Machine Platform:</p><pre><code class="language-powershell">dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart</code></pre><p>Source: <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-1---enable-the-windows-subsystem-for-linux">https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-1---enable-the-windows-subsystem-for-linux</a></p><h3 id="enable-wsl2">Enable WSL2</h3><p>Download the WSL2 Kernel Update here: <a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi">https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi</a>. Double-click to run after download.</p><p>Then in PowerShell, input the following command to set the default WSL version to 2: <code>wsl --set-default-version 2</code></p><h3 id="installing-a-wsl-distribution">Installing a WSL Distribution</h3><p>The easiest way to install a WSL distribution is by going to <a href="https://aka.ms/wslstore">Microsoft Store</a> and find your preferred Linux distribution. For this example, we use Ubuntu 20.04:</p><figure class="kg-card kg-image-card"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/image-13.png" class="kg-image" alt="Setup WSL2 and Docker on Windows" loading="lazy" width="1202" height="934"/></figure><p>Once you have found your preferred distribution, click on Install. And once the installation is done, launch PowerShell and execute the <code>wsl</code> command. It should now present you with the setup screen where you set up your Ubuntu's user name and password.</p><h3 id="extra-manually-install-a-wsl-distro-on-a-different-drive">Extra: Manually install a WSL distro on a different drive</h3><p>There is a way to install a WSL distribution on hard drives other than the default C: drive. To do this, manually download a distribution from here: <a href="https://docs.microsoft.com/en-us/windows/wsl/install-manual">https://docs.microsoft.com/en-us/windows/wsl/install-manual</a></p><p>Afterwards, use archive extracting programs like 7z and extract it to a directory of your preference, for example, D:\WSL\Ubuntu-20.04. Then launch Command Prompt or PowerShell in this directory and execute <code>ubuntu2004.exe</code> if using Ubuntu 20.04 like so:</p><p><code>.\ubuntu2004.exe</code></p><p>Follow the user name and password instructions.</p><p>Nice! Now we have Ubuntu 20.04 installed on WSL2. Do not forget to set your default distribution for the purposes of the next sections.</p><p><code>wsl --set-default Ubuntu-20.04</code></p><h2 id="installing-docker">Installing Docker</h2><p>Simply download Docker for Windows installer, then run it and follow the instructions. Download it here: <a href="https://desktop.docker.com/win/stable/amd64/Docker%20Desktop%20Installer.exe">https://desktop.docker.com/win/stable/amd64/Docker Desktop Installer.exe</a></p><p>This will automatically install the executables in the default WSL distribution you have set up previously.</p><!--kg-card-begin: markdown--><h2 id="limiting-maximum-ram-usage">Limiting Maximum RAM Usage</h2>
<p>Without limitation, WSL2 can take up a lot of RAM. In the case of 32GB RAM machines, it could take up to 20GB+. To limit the maximum RAM usage, go to <code>%USERPROFILE%</code>, which should resolve to your user's C:\Users folder (something like C:\Users\Ben) and create a <code>.wslconfig</code> file. The following <code>.wslconfig</code> example limits WSL usage to 16GB:</p>
<pre><code>[wsl2]
# kernel=&lt;path&gt;              # An absolute Windows path to a custom Linux kernel.
memory=16GB                  # How much memory to assign to the WSL2 VM.
# processors=&lt;number&gt;        # How many processors to assign to the WSL2 VM.
# swap=&lt;size&gt;                # How much swap space to add to the WSL2 VM. 0 for no swap file.
# swapFile=&lt;path&gt;            # An absolute Windows path to the swap vhd.
# localhostForwarding=&lt;bool&gt; # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true).

# &lt;path&gt; entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel
# &lt;size&gt; entries must be size followed by unit, for example 8GB or 512MB
</code></pre>
<p>The memory assignment can be changed up to preference, for example 8GB.</p>
<p>See: <a href="https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-18945">https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-18945</a></p>
<!--kg-card-end: markdown--><h2 id="development-usage-example">Development Usage Example</h2><p>Here we try to create a simple and minimal FastAPI project and run it with <code>docker-compose</code>. </p><p>All of the commands below are executed under Ubuntu WSL machine and so they require WSL shell. It can be opened just by pressing "Win + R" button and input <code>wsl</code> and then press Enter or click on "Ok", or just by executing <code>wsl</code> command under Command Prompt or PowerShell. Though, setting up a Windows Terminal app is more recommended: <a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701">https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701</a></p><h3 id="system-dependencies-setup">System Dependencies Setup</h3><p>Before starting development, let's install the system dependencies first. For this example, we use Python 3.</p><!--kg-card-begin: markdown--><pre><code class="language-sh">sudo apt update &amp;&amp; sudo apt upgrade -y
sudo apt install build-essential python3-dev python3-pip
</code></pre>
<!--kg-card-end: markdown--><h3 id="using-visual-studio-code-vscode-in-wsl">Using Visual Studio Code (VSCode) in WSL</h3><p>Download VSCode: <a href="https://code.visualstudio.com/#alt-downloads">https://code.visualstudio.com/#alt-downloads</a><br>Install the "Remote - WSL" Extension: <a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl">https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl</a></br></p><h3 id="creating-the-project">Creating the Project</h3><!--kg-card-begin: markdown--><p>Create a directory for the project and (optionally) launch VSCode</p>
<pre><code>cd ~
mkdir -p documents/docker-fastapi/
cd documents/docker-fastapi/
code .
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><p>To install FastAPI and Uvicorn as the server:</p>
<pre><code class="language-sh">pip install fastapi
pip install uvicorn[standard]
</code></pre>
<p>Reference: <a href="https://fastapi.tiangolo.com/tutorial/">https://fastapi.tiangolo.com/tutorial/</a></p>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><p>Then, create <code>main.py</code> under <code>app</code> directory (<code>mkdir app &amp;&amp; cd app</code>) in the project directory with the following content:</p>
<pre><code class="language-python">from fastapi import FastAPI

app = FastAPI()


@app.get(&quot;/&quot;)
async def root():
    return {&quot;message&quot;: &quot;Hello World&quot;}

</code></pre>
<p>You should now have a directory structure like the following:</p>
<pre><code>.
└── app
    └── main.py
</code></pre>
<p>Then to run the API (with auto-reload):</p>
<pre><code class="language-sh">uvicorn main:app --reload
</code></pre>
<p>When Uvicorn has completed loading, you should see the following output:</p>
<pre><code class="language-sh">INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
</code></pre>
<p>This means the API server is running and is accessible through the browser using the URL in the output (<a href="http://127.0.0.1:8000">http://127.0.0.1:8000</a>). Give it a try before proceeding to Dockerize this app!</p>
<p>Reference: <a href="https://fastapi.tiangolo.com/tutorial/first-steps/">https://fastapi.tiangolo.com/tutorial/first-steps/</a></p>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><p>To run the app in Docker, create a Dockerfile in the project root with the following content:</p>
<pre><code>FROM python:3.7

RUN pip install fastapi uvicorn

EXPOSE 80

COPY ./app /app

CMD [&quot;uvicorn&quot;, &quot;app.main:app&quot;, &quot;--host&quot;, &quot;0.0.0.0&quot;, &quot;--port&quot;, &quot;80&quot;]
</code></pre>
<p>You should now have a directory structure like the following:</p>
<pre><code>.
├── app
│   └── main.py
└── Dockerfile
</code></pre>
<p>To run without Docker Compose, simply run the following commands:</p>
<pre><code class="language-sh">docker build -t fastapi-image .
docker run -d --name fastapi-container -p 8000:80 fastapi-image
</code></pre>
<p>Once the container is running, it should also be accessible at <a href="http://127.0.0.1:8000">http://127.0.0.1:8000</a>.</p>
<p>Reference: <a href="https://fastapi.tiangolo.com/deployment/docker/">https://fastapi.tiangolo.com/deployment/docker/</a></p>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><p>Finally, to run with docker-compose, simply create a <code>docker-compose.yml</code> file in the project root with the following contents:</p>
<pre><code>version: &quot;3.8&quot;

services:
  fastapi:
    build: &quot;.&quot;
    ports: &quot;8080:80&quot;

</code></pre>
<p>Depending on actual project requirements, you might need to add database services like MySQL. Take a look at Docker Compose information here for more: <a href="https://docs.docker.com/compose/">https://docs.docker.com/compose/</a></p>
<p>Then, simply run:</p>
<pre><code class="language-sh">docker-compose up --build
</code></pre>
<p>Once the build process is done and the service(s) goes up, it should be accessible at <a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a>.</p>
<p>To clean up:</p>
<pre><code class="language-sh">docker-compose down --rmi local
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Integrating Capacitor JS with React]]></title><description><![CDATA[
--------------------------------------------------------------------------------

Install and Configure Capacitor
First of all, prepare your React application which you want to integrate with
Capacitor JS. If you have not created one, you can see how to create React
Typescript with Tailwind CSS in this tutorial [https://hots.ro2.page/fi/].

If you already have a React application you can directly go to your React app
project directory and install Capacitor JS using this command:

npm install @c]]></description><link>http://localhost:18093/integrate-capacitor-js-with-react/</link><guid isPermaLink="false">Ghost__Post__60fe50f2be9ea8000137bf23</guid><category><![CDATA[coding]]></category><category><![CDATA[developer]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[nodejs]]></category><category><![CDATA[javascript]]></category><category><![CDATA[open source]]></category><category><![CDATA[react]]></category><category><![CDATA[typescript]]></category><category><![CDATA[tools]]></category><category><![CDATA[web development]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Mon, 26 Jul 2021 09:59:11 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-26-at-13.07.16.png" medium="image"/><content:encoded><![CDATA[<hr><h2 id="install-and-configure-capacitor">Install and Configure Capacitor</h2><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-26-at-13.07.16.png" alt="Integrating Capacitor JS with React"/><p>First of all, prepare your React application which you want to integrate with Capacitor JS. If you have not created one, you can see how to create React Typescript with Tailwind CSS in <a href="https://hots.ro2.page/fi/">this tutorial</a>.</p><p>If you already have a React application you can directly go to your React app project directory and install Capacitor JS using this command:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm install @capacitor/core @capacitor/cli</div>
<!--kg-card-end: html--><p>After the installation is finished, continue with initializing the Capacitor configs.</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npx cap init [name] [id] --web-dir=build
</div>
<!--kg-card-end: html--><h2 id="build-and-prepare-native-platforms">Build and Prepare Native Platforms </h2><p>After finished with all the Capacitor configurations, build the React application using "<strong>npm run build</strong>"<strong> </strong>command first and then install the iOS and Android plugins for Capacitor JS using this command:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm i @capacitor/ios @capacitor/android
</div>
<!--kg-card-end: html--><p>After finished installed the iOS and Android plugin for Capacitor JS, add the platform for iOS and Android in Capacitor using these commands:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npx cap add android<br/>
npx cap add ios
</div>
<!--kg-card-end: html--><p>After adding the native platforms, we can open and run the native platforms using these commands:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
	npx cap open ios <span style="color:gray;">// Open XCode</span><br/>
    npx cap open android <span style="color:gray;">// Open Android Studio</span>
</div>
<!--kg-card-end: html--><p>Congratulations! You have successfully adding capacitor to your React application. For more info, you can learn more <a href="https://capacitorjs.com/docs/basics/workflow">here</a>. If you want to integrate your React application with Firebase Cloud Functions you can check <a href="https://hots.ro2.page/setup-firebase-cloud-functions-with-react-project/">this tutorial</a>.</p></hr>]]></content:encoded></item><item><title><![CDATA[Setup Firebase Cloud Function]]></title><description><![CDATA[
--------------------------------------------------------------------------------

Preparations
First of all you have to create Firebase project in Firebase Console
[https://console.firebase.google.com/u/0/], for more informations about Firebase
project you can learn more here
[https://firebase.google.com/docs/projects/learn-more]. In this tutorial I will
be using Node.js [https://nodejs.org/] environment. You can check the supported
Node.js version for Firebase here
[https://firebase.google.com]]></description><link>http://localhost:18093/setup-firebase-cloud-functions-with-react-project/</link><guid isPermaLink="false">Ghost__Post__60f92a00be9ea8000137bcb0</guid><category><![CDATA[developer]]></category><category><![CDATA[open source]]></category><category><![CDATA[web development]]></category><category><![CDATA[web servers]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Thu, 22 Jul 2021 09:20:07 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/firebase_cloud_functions.png" medium="image"/><content:encoded><![CDATA[<hr><h2 id="preparations">Preparations</h2><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/firebase_cloud_functions.png" alt="Setup Firebase Cloud Function"/><p>First of all you have to create Firebase project in <a href="https://console.firebase.google.com/u/0/">Firebase Console</a>, for more informations about Firebase project you can learn more <a href="https://firebase.google.com/docs/projects/learn-more">here</a>. In this tutorial I will be using <a href="https://nodejs.org/">Node.js</a> environment. You can check the supported Node.js version for Firebase <a href="https://firebase.google.com/docs/functions/manage-functions#set_nodejs_version">here</a>.</p><p>Now, I assume that you already create the Firebase project and have Node.js environment installed. Next step is you need to install the firebase CLI using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm install -g firebase-tools</div>
<!--kg-card-end: html--><h2 id="initialize-local-firebase-project">Initialize local Firebase Project</h2><p>After that, login into Firebase.</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase login</div>
<!--kg-card-end: html--><p>Next, go to your local Firebase Project directory and initialize the firestore and cloud functions.</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    cd YOUR_FIREBASE_PROJECT_DIRECTORY<br/>firebase init firestore<br/>firebase init functions
</div>
<!--kg-card-end: html--><h2 id="creating-and-emulating-the-cloud-functions">Creating and Emulating the Cloud Functions</h2><p>After that, Import required modules and then initialize the app inside your <strong>index.ts </strong>file.</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    <div style="margin-left:0px;color:gray;">
     	/* index.ts */
    </div>
    <div style="margin-left:20px;color:gray;">
     	// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
    </div>
    <div style="margin-left:20px;">
        const functions = require('firebase-functions');
    </div>
    <div style="margin-left:20px;color:gray;">
     	// The Firebase Admin SDK to access Firestore.
    </div>
    <div style="margin-left:20px;">
        const admin = require('firebase-admin');
        <br/>
        admin.initializeApp();
    </div>
</div>
<!--kg-card-end: html--><p>Now, you can create your public Firebase cloud functions using <strong>functions.<em>https</em>.onCall() </strong>and <strong>functions.<em>https</em>.onRequest() </strong>callback functions that can be used over https call inside your <strong>index.ts</strong> file.</p><p>Next, start the Firebase cloud function emulator in local environment using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase emulators:start</div>
<!--kg-card-end: html--><p>Check the output of this command to get the URL format to call the cloud functions it will be looks like this:</p><p><a href="http://localhost:5001/MY_PROJECT/us-central1/addMessage,">http://localhost:5001/MY_PROJECT_ID/us-central1/</a></p><p>The port may be vary according to your local machine environment.</p><h2 id="deploying-firebase-cloud-functions">Deploying Firebase Cloud Functions</h2><p>Deploying Firebase cloud functions to productions is a quite simple process you can just directly run this command:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">firebase deploy --only functions
</div>
<!--kg-card-end: html--><p>Congratulation! You have successfully creating and deploying your Firebase cloud functions, now you can access the cloud functions that you have created to your React application. If you don't have any React application yet you can follow <a href="https://hots.ro2.page/fi/">this tutorial </a>to create a React application using typescript and tailwind css.</p></hr>]]></content:encoded></item><item><title><![CDATA[Setup ReactJS Typescript with Tailwind CSS]]></title><description><![CDATA[
--------------------------------------------------------------------------------

React and Typescript Setup
First of all, make sure that Node JS is already installed. If not you can check
the installation here [https://nodejs.org/en/download/]. In this tutorial, I
will be using typescript for the React application. 

The simplest and fastest way to set up React is by using facebook's Create React
App (CRA) site generator. 

# Generate a new React Typescript project npx create-react-app
new-typ]]></description><link>http://localhost:18093/reactjs-typescript-setup-with-tailwind-css/</link><guid isPermaLink="false">Ghost__Post__60f79b21be9ea8000137baef</guid><category><![CDATA[coding]]></category><category><![CDATA[developer]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[javascript]]></category><category><![CDATA[nodejs]]></category><category><![CDATA[open source]]></category><category><![CDATA[react]]></category><category><![CDATA[typescript]]></category><category><![CDATA[tools]]></category><category><![CDATA[web development]]></category><category><![CDATA[web framework]]></category><dc:creator><![CDATA[Kevin Mustafa]]></dc:creator><pubDate>Wed, 21 Jul 2021 09:15:59 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-21-at-16.03.42.png" medium="image"/><content:encoded><![CDATA[<hr><h2 id="react-and-typescript-setup">React and Typescript Setup</h2><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/Screen-Shot-2021-07-21-at-16.03.42.png" alt="Setup ReactJS Typescript with Tailwind CSS"/><p>First of all, make sure that Node JS is already installed. If not you can check the installation <a href="https://nodejs.org/en/download/">here</a>. In this tutorial, I will be using typescript for the React application. </p><p>The simplest and fastest way to set up React is by using facebook's Create React App (CRA) site generator. </p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    <div>
		# Generate a new React Typescript project
    </div>
    <div style="margin-bottom:20px;">
        npx create-react-app new-typescript-app --template typescript
    </div>
    <div>
    	# Wait for installation, after that go to the created directory
    </div>
    <div>
        cd new-typescript-app
    </div>
</div>
<!--kg-card-end: html--><p>If you already have an existing React application and you want to add typescript inside you can use this command:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    <div>
		# Adding typescript template to existing project
    </div>
    <div>
        npm install --save typescript @types/node @types/react @types/react-dom @types/jest
    </div>
</div>
<!--kg-card-end: html--><p>After the installation, the package.json file should show React and Typescript packages. Change the .js files to .tsx file to use the Typescript features.</p><hr><h2 id="tailwind-setup">Tailwind Setup</h2><p>First, install Tailwind and all the dependencies using:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9</div>
<!--kg-card-end: html--><p>After Tailwind dependencies are installed successfully, we will configure the tailwind using <a href="https://github.com/gsoft-inc/craco">CRACO</a> by running:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npm install @craco/craco</div>
<!--kg-card-end: html--><p>After that, update your <strong>package.json </strong>instead of using "<strong>react-scripts"</strong>, change that into "<strong>craco" </strong>except the "<strong>eject" </strong>part:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    <div style="margin-left:10px;">{</div>
    <div style="margin-left:20px;">... </div>
    <div style="margin-left:20px;">"scripts": { </div>
    <div style="margin-left:30px;background-color:green;">"start": "craco start",</div>
    <div style="margin-left:30px;background-color:green;">"build": "craco build",</div>
    <div style="margin-left:30px;background-color:green;">"test": "craco test",</div>
    <div style="margin-left:30px;">"eject": "react-scripts eject",</div>
    <div style="margin-left:20px;">}</div>
    <div style="margin-left:10px;">}</div>
</div>
<!--kg-card-end: html--><p/><p>Next, create a <strong>craco.config.js </strong>file inside your root project and follow the content below: </p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
    <div style="margin-left:10px;color:gray;">// craco.config.js</div>
    <div style="margin-left:10px;">module.exports = {</div>
    <div style="margin-left:20px;">style: {</div>
    <div style="margin-left:30px;">postcss: {</div>
    <div style="margin-left:40px;">plugins: [</div>
    <div style="margin-left:50px;">require('tailwindcss'),</div>
    <div style="margin-left:50px;">require('autoprefixer'),</div>
	<div style="margin-left:40px;">]</div>
    <div style="margin-left:30px;">}</div>
    <div style="margin-left:20px;">}</div>
    <div style="margin-left:10px;">}</div>
</div>
<!--kg-card-end: html--><p>If you want to explore further on PostCSS plugins you can check it <a href="https://tailwindcss.com/docs/using-with-preprocessors">here</a>.</p><p>After that, generate the <strong>tailwind.config.js</strong> file:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">npx tailwindcss-cli@latest init</div>
<!--kg-card-end: html--><p>To avoid unused styles in production builds you can add this to <strong>tailwind.config.js </strong>inside "purge" section:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],</div>
<!--kg-card-end: html--><p>Update the <strong>index.css </strong>that was created by default using Create React App command:</p><!--kg-card-begin: html--><div class="codeSection" style="background-color:black;color:white;padding:8px;font-size:12pt;font-weight:500;border-radius:4px;">
<div style="color:gray;">/* ./src/index.css */</div>
@tailwind base;<br/>
@tailwind components;<br/>
@tailwind utilities;<br/>
</div>
<!--kg-card-end: html--><p>Ensure you have imported the <strong>index.css</strong> inside your <strong>index.tsx </strong>file.</p><p>Congratulations! You have finished the tutorial to create react typescript using Tailwind CSS! After this, you can run and test your React Typescript application using the <strong>npm run start </strong>command.</p></hr></hr>]]></content:encoded></item><item><title><![CDATA[12 Essentials React Tools for Developers 2021]]></title><description><![CDATA[What is React? React is a JavaScript library for building user interfaces and
one of the most popular JavaScript frameworks for creating front-end
applications right now (based on here
[https://medium.com/javascript-scene/top-javascript-frameworks-and-tech-trends-for-2021-d8cb0f7bda69]
). If you want to learn the framework that will give you the best odds of
getting a job in 2021, your best bet is still React and has been since 2017.
Because of its popularity, we decided to make a list of the be]]></description><link>http://localhost:18093/12-essentials-react-tools-for-developers-2021/</link><guid isPermaLink="false">Ghost__Post__60f01ed34b140a0001228919</guid><category><![CDATA[react]]></category><category><![CDATA[typescript]]></category><category><![CDATA[open source]]></category><category><![CDATA[github]]></category><category><![CDATA[developer]]></category><category><![CDATA[javascript]]></category><dc:creator><![CDATA[Hadi]]></dc:creator><pubDate>Mon, 19 Jul 2021 11:23:00 GMT</pubDate><media:content url="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/technology-9QPV9L8.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/technology-9QPV9L8.jpg" alt="12 Essentials React Tools for Developers 2021"/><p>What is React? React is a JavaScript library for building user interfaces and one of the most popular JavaScript frameworks for creating front-end applications right now (based on <a href="https://medium.com/javascript-scene/top-javascript-frameworks-and-tech-trends-for-2021-d8cb0f7bda69">here</a>). If you want to learn the framework that will give you the best odds of getting a job in 2021, your best bet is still React and has been since 2017. Because of its popularity, we decided to make a list of the best React tools to use, so here is our version of React Tools for Developers and Researchers in 2021.</p><h2 id="package-manager-npm-homebrew"><strong><a href="https://www.npmjs.com/">Package Manager (NPM / Homebrew)</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/npm.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="360" height="140"><figcaption>npm logo (source: npmjs.com)</figcaption></img></figure><p>Npm stands for the Node Package Manager. It is the package manager for <a href="http://nodejs.org/">Node.js</a>. Npm was originally created in 2009 as an open-source project to enable JavaScript developers to share packaged modules of code. And now, npm is a tool to manage your application repository by using a simple command-line install, update, and uninstall has become an easy task, and you can just focus on using the library instead.</p><p>Open-source developers from all over the globe use npm to share and borrow packages since it is the largest software registry in the world. Many business corporations use npm to organize private development as well. So for you, open-source developers, who would like to build the user interface using React, it is a good idea to try on npm.</p><p>While Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's operating system macOS as well as Linux. In other words, Homebrew helps you to install the stuff you need that Apple or Linux systems didn't. Many developers have recommended Homebrew since it is easy to use as well as integrating into the command-line interface.</p><p>If you are using Windows you can install npm which comes with <a href="https://nodejs.org/en/">Node.js</a>. Or if you are using a Mac (or any Linux-based OS), you should install <a href="https://brew.sh/">homebrew</a>.</p><h2 id="create-react-app"><strong><a href="https://create-react-app.dev/docs/getting-started/">Create React App</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/create-react-app.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="266"><figcaption>create react app (source: create-react-app.dev)</figcaption></img></figure><p>Starting a React project sometimes can be time-consuming. You have to spend time establishing the right build tools to set up a local environment, unit testing, and production build. But worry no more because the Create React App is the right tool to do all those things.</p><p>Create React App is a tool that provides a massive head start when building React apps. It saves you from time-consuming setup and configuration. You just run a single command and the Create React App prepares the tools you need to get started on your React project. It provides a modern, configurable build setup. CRA is ready to use boilerplate open source projects to get a fast start when using React; default configurations will be set automatically to get React running for your project needs.</p><p>The Create React App is a great environment for learning React and is a great way to get started with creating a new one-page application in React. So why don't you give it a <a href="https://create-react-app.dev/docs/getting-started/">try</a>?</p><h2 id="eslint-prettier"><a href="https://eslint.org/">Eslint</a> &amp; <a href="https://prettier.io/">Prettier</a></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/eslint-and-prettier.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="156"><figcaption>eslint &amp; prettier (source: eslint.org &amp; prettier.io)</figcaption></img></figure><p>The idea of ESLint is for detecting and fixing code errors while Prettier is a tool for formatting your code but they'll make your development process easier when combined. ESLint scans your JavaScript file for common syntax and style errors automatically. Prettier performs scanning for style issues on your file then reformats your code automatically to assure consistent rules are followed. </p><p>ESLint is actually a linter for JavaScript code where it analyzes code for errors. ESLint also comes with a predefined best-practice configuration that is easy to set up. You can add other rules as you want to suit your needs.</p><p>When you're writing code and don't want to worry about the code formatting, Prettier will take care of it for you. It creates an abstract syntax and uses it to write new formatted code according to a set of rules. Developers will never have to go through inconsistent codebases looking for mistakes or to think about style while writing code. </p><p>Just make sure when using ESLint with Prettier, they do not conflict with each other's formatting code. You can check <a href="https://indepth.dev/posts/1282/setting-up-efficient-workflows-with-eslint-prettier-and-typescript">indepth.dev guide on ESLint and Prettier</a> to learn more.</p><h2 id="react-developer-tools"><strong><a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en">React Developer Tools</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/react-developer-tools.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="242"><figcaption>react dev tools (source: chrome.google.com)</figcaption></img></figure><p>React Developer Tools is a Chrome DevTools extension for the open-source React JavaScript library. It allows you to view all of the React component hierarchies and the properties of a page in the Chrome Developer Tools.</p><p>The root of React components that are rendered on the page can be shown on the Components tab, as well as the subcomponents. You can explore and edit the current state and props in the panel on the right by selecting one of the components in the tree. And when you switch over to the React tab after inspecting a React element on the page using the regular Elements tab, the element will automatically be selected in the React tree.</p><p>React DevTools is also available for <a href="https://addons.mozilla.org/en-US/firefox/addon/react-devtools/">Firefox</a> users.</p><h2 id="react-proto"><a href="https://react-proto.github.io/react-proto/">React Proto</a></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/react-proto.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="163"><figcaption>react proto (source: react-proto.github.io)</figcaption></img></figure><p>React Proto is a tool for prototyping React design, with easier design visualization to define the components or properties while creating the user interface. The main idea of this tool was to boil down the initial process of mocking up and developing client-side applications. </p><p>So whenever you need to grasp the design while also foreseeing all possible components needed, you can just quickly create, drag, and resize components to create a visual representation of your application.</p><p>Download React Proto for <a href="https://github.com/React-Proto/react-proto/releases/download/v1.0.0/React-Proto.Web.Setup.1.0.0.exe">Windows</a>, <a href="https://github.com/React-Proto/react-proto/releases/download/v1.0.0/React-Proto-1.0.0.dmg">macOS</a>, <a href="https://github.com/React-Proto/react-proto/releases/download/v1.0.0/react-proto_1.0.0_amd64.deb">Linux</a>.</p><h2 id="bit"><strong><a href="https://bit.dev/">Bit</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/bit.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="266"><figcaption>bit (source: bit.dev)</figcaption></img></figure><p>It becomes so monotonous and time-consuming to rewrite the same logic for a similar component with a previous project every time we start a new project. So whenever you're looking for a way to have a high module and reusable codebase for a team project, <a href="https://bit.dev/">Bit</a> is everything you need from local development to cross-project integrations. </p><p>Bit allows you to share and sync components between different projects and applications in order to create reusable components in a scalable and collaborative way.</p><h2 id="belle"><strong><a href="http://nikgraf.github.io/belle/">Belle</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/belle.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="213"><figcaption>belle (source: nikgraf.github.io/belle)</figcaption></img></figure><p>Belle allows you to browse a set of React components such as Toggle, ComboBox, Rating, TextInput, Button, Card, Select, etc. So that you do not need to create the components from scratch, instead you can just import and use them. All of the components are highly optimized to work both on mobile and desktop devices. The base styles of the components are highly customizable to let you configure and modify every one of them individually. </p><p><a href="http://nikgraf.github.io/belle/">Belle</a> provides configurable React components with great UX.</p><h2 id="gatsby"><strong><a href="https://www.gatsbyjs.com/">Gatsby</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/gatsby-logo-3.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="318" height="159"><figcaption>gatsby (source: gatsbyjs.com)</figcaption></img></figure><p>When you talk about building websites, Gatsby is what you need to build a website with React in a simple way. It is an open-source static website generator for React that manages the page creation on the server-side and HTML static server for the client browser. </p><p>Created in May 2015 by Kyle Mathews, the main idea of <a href="https://www.gatsbyjs.com/">Gatsby</a> is to build a website with React in a simple way. Gatsby is optimized to build static sites that are progressive web apps to follow the latest web standards with speed and security. By using Gatsby, the loading web performance is greatly improved because of static HTML that serves the client.</p><h2 id="react-testing-library"><strong><a href="https://testing-library.com/docs/react-testing-library/intro/">React Testing Library</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/testing-library.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="117"><figcaption>react testing library (source: testing-library.com)</figcaption></img></figure><p>React Testing Library allows developers to test the React DOM with best testing practices. It enables developers to modify and refactor the code in less time-consuming ways by letting the element or attribute of the React DOM be tested in React Testing Library.</p><p>The React Testing Library is a simple and complete solution for testing React components. React DOM testing utilities encourage good test practices, provide light utility functions on top of react-dom and react-dom/test-utils. But keep in mind that the React Testing Library should be used along with <a href="https://jestjs.io/">Jest</a>.</p><h2 id="reactide"><strong><a href="https://reactide.io/">Reactide</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/reactide.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="512" height="227"><figcaption>reactide (source: reactide.io)</figcaption></img></figure><p>Reactide is the first dedicated IDE for React web development. It indicates the browser and the source code under one IDE application and when hot reloading is enabled, the traversing between IDE, browser, and server is not required that changes user behaviour when developing React.</p><p>It is a cross-platform desktop application that brings an integrated suite of development tools to streamline React development. Reactide offers a simulator, made for live reloading and quick React component prototyping.</p><p>Download Reactide for <a href="https://github.com/reactide/reactide">Windows</a>, <a href="https://github.com/reactide/reactide/releases/download/v3.0-beta/Reactide-3.0.0.dmg">macOS</a>, <a href="https://github.com/reactide/reactide">Debian &amp; Ubuntu</a>.</p><h2 id="nextjs"><strong><a href="https://nextjs.org/">Next.Js</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/next-js-logo.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="318" height="159"><figcaption>next.js (source: nextjs.org)</figcaption></img></figure><p>It is awesome to work on a modern JavaScript application powered by React until some problems related to content rendering occur. It takes longer for the page to load because all the JavaScript must load first before the content loads and your application needs to determine what to show on the page. Server rendering which is also called static pre-rendering is the solution for those problems. Next.js is the answer to serve the job for those problems. </p><p>What is Next.js? <a href="https://nextjs.org/">Next.js</a> is an open-source React front-end development web framework that enables the React page to be rendered on the server-side (SSR) and generates static websites for React-based web applications. It is a production-ready framework that gives a quick static and dynamic <a href="https://en.wikipedia.org/wiki/Netlify#Jamstack">JAMstack</a> website creation and is often used by many big companies.</p><p>If you want to learn more about Next.js just click <a href="https://nextjs.org/learn/basics/create-nextjs-app?utm_source=next-site&amp;utm_medium=homepage-cta&amp;utm_campaign=next-website">here</a>!</p><h2 id="storybook"><strong><a href="https://storybook.js.org/">Storybook</a></strong></h2><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blogs-hots-files.s3.amazonaws.com/images/2021/07/storybook.png" class="kg-image" alt="12 Essentials React Tools for Developers 2021" loading="lazy" width="244" height="207"><figcaption>storybook logo (source: storybook.js.org)</figcaption></img></figure><p>In general, Storybook is an open-source tool for UI components and page isolation development. It makes building, documenting, and UI testing easier. </p><p><a href="https://storybook.js.org/">Storybook</a> helps to isolate the development of a component so won't be bothered by other unrelated components or the main app. This function helps you to develop UI components rapidly without concern about the app. </p><p>While documenting all the components for reuse, Storybook also helps you to automatically test your components visually to prevent bugs. There are some tools integrated with Storybook, like <a href="https://reactjs.org/">React</a>, <a href="https://vuejs.org/">Vue.js</a>, <a href="https://reactnative.dev/">React Native</a>, <a href="https://percy.io/">Percy</a>, <a href="https://applitools.com/">Applitools</a>.</p><p>Want to learn more about Storybook? Just click <a href="https://storybook.js.org/tutorials/intro-to-storybook/">here</a>!</p><h2 id="conclusion"><strong>Conclusion</strong></h2><p>So here is our list of 12 Essential React Tools for Developers in 2021. As you already saw, each tool has its advantages. It roots down to every developer's needs and preferences to utilize whichever tools to use because there are still alternative tools for each solution in case of development. </p><p>Is your React Developer Tool not on the list above? Drop your comment below to discuss!</p>]]></content:encoded></item></channel></rss>