<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jason Jiang on Medium]]></title>
        <description><![CDATA[Stories by Jason Jiang on Medium]]></description>
        <link>https://medium.com/@jasonlikenfs?source=rss-bde6832e77eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KA8swdi8FoIP7dr8.</url>
            <title>Stories by Jason Jiang on Medium</title>
            <link>https://medium.com/@jasonlikenfs?source=rss-bde6832e77eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:02:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jasonlikenfs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[koa-web-kit: A Modern, Production-Ready, and Full-Stack Node Web Framework]]></title>
            <link>https://medium.com/@jasonlikenfs/koa-web-kit-a-modern-production-ready-and-full-stack-node-web-framework-9b5eb3b8af1?source=rss-bde6832e77eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b5eb3b8af1</guid>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[koajs]]></category>
            <dc:creator><![CDATA[Jason Jiang]]></dc:creator>
            <pubDate>Wed, 09 May 2018 03:24:51 GMT</pubDate>
            <atom:updated>2018-05-09T03:24:51.913Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hGgElQJ-DM2t875N." /><figcaption>Photo by <a href="https://unsplash.com/@spacex?utm_source=medium&amp;utm_medium=referral">SpaceX</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are lots of starter kit or boilerplate projects out there, most of which are focusing just on front-end development, like the simple yet powerful <a href="https://github.com/facebookincubator/create-react-app">create-react-app</a>, but as a full stack developer like myself, a static site focused boilerplate is not enough for building complex web applications both for front-end and back-end. So here I will introduce yet another Node.JS full stack framework <a href="https://github.com/JasonBoy/koa-web-kit">koa-web-kit</a>, which may not suit for everyone, but at least you have one more choice at your disposal, right?🤣 which is also great.</p><h3><strong>🙌 Highlighted Features</strong></h3><ul><li>✨Built with all modern frameworks and libs, including Koa2, React(like <a href="https://github.com/JasonBoy/vue-web-kit">Vue.js?</a>), Bootstrap-v4(CSS only), Webpack, ES6, Babel…</li><li>📦Get all the Node.JS full stack development experience out of the box</li><li>🔥Hot Module Replacement support, and bundle size analyzer support</li><li>📉Async/Await support for writing neat async code</li><li>💖SASS preprocessor, PostCSS, autoprefixer for better css compatibility</li><li>🎉Simple API Proxy bundled, no complex extra nginx configuration</li><li>🌈Available for generating static react site, and React SSR support</li><li>⚡️Just one npm command to deploy your app to production</li><li>👷Continuously Maintaining🍻</li></ul><h3>🦄 Server Side</h3><p>The framework’s server side is built on <a href="https://github.com/koajs/koa">koajs</a>, a next generation web framework for node.js, created by the forks also invented the famous <a href="https://expressjs.com/">expressjs</a> MVC framework. Koa supports the latest async/await syntax so that you can have a better experience writing async code in a sync coding style, which is awesome😎. Also it has a better and more semantic middleware mechanism, with which you can add lots of small middlewares focusing on single functionality to make your application richer and more robust, instead of pre-bundling lots of middlewares ahead, which makes koa much more ligthweight.</p><p>Every modern web application may have an API layer which may write in other languages(e.g java, go…), which may also served on a different api endpoint, in which case we may need to configure a reverse proxy service to proxy our fetch requests to the api endpoint to workaround the CORS issue restricted by the browser. That could make your dev env setup process much more complex and time wasting, so with the help of <a href="https://github.com/JasonBoy/koa-web-kit">koa-web-kit</a>, a pre-bundled API Proxy may save you a lot of time by setting up your dev environment, you just need to configure a custom url prefix mapping to the real api endpoint, and it’s done, all the requests in your browser will be delegated to the real api endpoint, what makes it even better is that you can not only configure just one endpoint(since your apis may live on different endpoints), but as many as you like, like the configuration below:</p><pre>config = {</pre><pre>  //…other configs</pre><pre>  &quot;API_ENDPOINTS&quot;: {</pre><pre>    //set a default prefix</pre><pre>    &quot;defaultPrefix&quot;: &quot;/prefix&quot;,</pre><pre>    //e.g http://127.0.0.1:3000/prefix/api/login →proxy to → http://127.0.0.1:3001/api/login</pre><pre>    &quot;/prefix&quot;: &quot;http://127.0.0.1:3001&quot;,</pre><pre>    &quot;/prefix2&quot;: &quot;http://127.0.0.1:3002&quot;<br>  }<br>}</pre><p>Simple right? You don’t need to setup another nginx server on your local development env, just type some configurations, and there you go.</p><blockquote>As in production env, it may be better to use a reverse proxy to proxy the apis directly to backend, instead of sending all requests to node, which may blow up your node server.</blockquote><p>And also a log layer is necessary for every server side application, <strong>koa-web-kit</strong> also provides a default simple logger utility, powered by the amazing async logging library <a href="https://github.com/winstonjs/winston">winston</a>, e.g:</p><pre>const logger = require(&#39;./services/logger&#39;);<br>logger.info(msg);<br>logger.warn(msg);<br>logger.error(msg);</pre><p>You can add custom transports to winston to add more specific loggers, all the logs are kept in ./logs dir by default.</p><p>Usually we will minify all the static assets(css, js, html…) for browsers to speed up your page loading, but people rarely think about minifying their node.js side code, which can also make your node.js code less readable, less packed size, and do some pre-optimization by the tools. With <strong>koa-web-kit</strong>, we also provide a webpack build script to minify your nodejs code, cheers🍻.</p><p>In case you have dynamic template rendering, instead of just plain html with all content rendered by the React/Vue like libraries, we also got your back, <a href="https://github.com/mozilla/nunjucks"><em>nunjucks</em></a> template engine is bundled by default, but you can use any other javascript template engine you’d like, which is powered by <a href="https://github.com/tj/consolidate.js/">consolidate.js</a>.</p><p>Also the SSR(SERVER SIDE RENDERING) is a must have for a server framework, we also provide simple support for React SSR for better SEO and Page speed, you can simply enable/disable SSR by just setting an option when you don’t need it.</p><p>A so called full stack framework should also include a DB layer, right? Yes, exactly, but to make <strong>koa-web-kit</strong> not so opinionated on the perspective of database, and since modern development is all about modularity, you can simplely <em>npm install</em> any db layer, or db ORM packages suit for your choice of database, another condition is that not all node.js apps have to develop apis or db operations on their own, since it may already being developing by other teams, or other backend languages, in which case, you only need to configure to use these apis as mentioned above in the configuration file. and that’s why the preconfigured db layer is not included by default to make the framework stay as simple as possible, yet also easy to extend when necessary.</p><p>Another cool stuff that I want to share is that <strong>koa-web-kit</strong> has multiple environment variables configuration layers. As we all know, every project needs some envs to indicate that it needs to run differently on different environments, such as in dev env, we will send api requests to the dev endpoint, and later when deployed to production, it should send requests to the production api endpoint; another use case is that in dev env, we need to log lots of message for better debugging, but we don’t need these in production mode, and also we can add different features based on different envs…, there are lots of stuff that we depend on environment variables. So with <strong>koa-web-kit</strong>, you can set envs in different ways:</p><ul><li>app-config.js/app-config.js.sample, you can copy the pre-included app-config.js.sample to app-config.js, and set different options inside in your local env.</li><li>Environment Variables, when you run scripts, you can also set environment variables with the same key, to override the config in app-config.js</li><li>Default config/build.dev(prod).js in source code, this one is used in case you use neither app-config.jsnor Environment Variables.</li></ul><p>More details check out the <a href="https://github.com/JasonBoy/koa-web-kit#environment-variables">koa-web-kit#ENV_Configuration</a>.</p><h3>💓 Front End</h3><p>And finally we are here, the front-end stuff. koa-web-kituses the latest front-end libraries and tools to help you utlize the best techs in the community.<br>Featuring:</p><ul><li>React-v16, one of the most famous libs to build declarative UIs, with a very active and big community support.</li><li>Bootstrap-v4, most used css/layout framework for building responsive websites, with the latest v4 version, utlizing the cool css flexbox feature.</li><li>Embrace the ES6, with the help of webpack and babel, you can use the latest new javascript features without worrying about backward compatibility, new syntax can be transpiled to ES5 based on your <a href="https://github.com/ai/browserslist">browerslist</a> config.</li><li>SASS/SCSS preprocessor for your style sheets, with the extra PostCSS to write no vendor prefixed and clear css styles, yet still autoprefixed based on browerslist config while building.</li></ul><h3>☕️ Production Deployment</h3><p>After you’ve finished your development for both of your front and back end code, it’s time to deploy your app to production so that your users can access it. And yet again, with koa-web-kit, the deployment experience is still easy and simple, with just one npm script command with several additional options, then just grab a cup of ☕️ and wait for it to finish. For example:</p><p>npm run deploy, simplest one , do all tasks<br>npm run deploy -- 1, this will skip the npm install --no-shrinkwrap, and just go to build and start server, <br>for more options and examples, check out <a href="https://github.com/JasonBoy/koa-web-kit#production-deployment">koa-web-kit#Deploy</a></p><h3>🍗 Bonus Round: Generate a Static Site</h3><p>Even though koa-web-kit is a full stack framework, you can still generate a static site if you don’t need any server side stuff without losing all the dev experiences koa-web-kit offers. <br>When you want to generate a static site, there is one more thing you may need to put into consideration, the prefix path and the trailing slash confusion, which is also documented in the famous static site generator <a href="https://www.gatsbyjs.org/docs/path-prefix/">Gatsby</a>. The thing is that when you want to deploy the static site to some 3rd servers, like github pages, or the famous static site service provider like <a href="https://www.netlify.com/">netlify</a>, in which cases, your app may be served on a sub directory url(https://medium.com/e.g%20%3Ca%20href=%22/service/https://user.github.io/app1/%22%3Ehttps://user.github.io/app1/%3C/a%3E), here the prefix for your site is /app1/, everything should be stay under the sub path /app1/, with koa-web-kit, it’s also very easy to configure that, for example, just in your app-config.js file:</p><pre>modules.exports = {<br>  //your cdn domain for your static assets if you have<br>  “STATIC_ENDPOINT”: “<a href="http://cdn.com/">http://cdn.com</a>&quot;,<br>  //additional prefix for your cdn domain<br>  “STATIC_PREFIX”: “/public/”,<br>  //trailing slash for “APP_PREFIX”<br>  “PREFIX_TRAILING_SLASH”: true,<br>  //here is the prefix path for your app1, <br>  //if “PREFIX_TRAILING_SLASH” is true,<br>  //the final “env.prefix” value(details below) will be “/app1/”<br>  “APP_PREFIX”: “/app1”,<br>}</pre><p>So how do we access this in a programming level(like in your components), simple, just import that in your js:</p><pre>//full path: “./src/modules/env.js”<br>import env from ‘modules/env’;</pre><pre>// -&gt; “/app1/public/” , with extra static assets prefix<br>console.log(env.prefix); <br>// -&gt; “/app1/”<br>console.log(env.appPrefix); <br>// concat your static url if it does not need a webpack loader<br>&lt;img src={`${env.prefix}static/imgs/no-loader.png`}&gt;</pre><p>The webpack loader will also be prefix aware, so in your source code, just import your assets normally, or use relative bg path in your scss files.<br>If you want all the static assets have relative path without ‘/’ ahead, just set PREFIX_TRAILING_SLASH: false, STATIC_PREFIX: “”, APP_PREFIX: “”.</p><h3>✅ Conclusion</h3><p>And that’s a simple introduction of <a href="https://github.com/JasonBoy/koa-web-kit">koa-web-kit</a>, if you like, go ahead and have a try, feel free to <a href="https://github.com/JasonBoy/koa-web-kit/issues">fire an issue</a>, or a PR to request new features. Hope that will simplify your full stack node.js development experience.</p><p>With 💖 by <a href="https://github.com/JasonBoy/koa-web-kit">koa-web-kit</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b5eb3b8af1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Deep Dive Guide for Crawling SPA with Puppeteer and Troubleshooting]]></title>
            <link>https://medium.com/@jasonlikenfs/a-deep-dive-guide-for-crawling-spa-with-puppeteer-and-troubleshooting-9d4bea646dd4?source=rss-bde6832e77eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d4bea646dd4</guid>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[crawler]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[sap]]></category>
            <dc:creator><![CDATA[Jason Jiang]]></dc:creator>
            <pubDate>Tue, 31 Oct 2017 04:38:20 GMT</pubDate>
            <atom:updated>2017-10-31T04:42:45.210Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*TX1RCJA0_bIGWV7LXNsuaA@2x.png" /></figure><p>Websites have beening evolving from static sites to modern SPA applications, and with those changes, the tasks of SEO and web crawling have became a little bit tricky since you cannot get all the information from the initial html document. Here I will share some guides on how to crawl a SPA-like website with <a href="https://github.com/GoogleChrome/puppeteer">puppeteer</a>.<br>In a <a href="https://blog.lovemily.me/better-seo-by-pre-rendering-angularjs-like-apps/">previous post</a>, I shared how to use an existing service like prerender to serve better SEO for SPA apps, but here we will look at an even new lib with the latest Headless Chrome to work with, since we can use all the coolest and latest new features powered by Chrome, which brings us even closer to the real end users.I may not cover the really basic apis that we can use with puppeteer, like capturing a screenshot, generating a pdf, set a UA, etc…, but on the other hand, I’d rather to share some guides when you work on a real life website crawling, with some troubleshooting tips when you deploy your puppeteer application to production.</p><blockquote><em>Originally published on:</em></blockquote><p><a href="https://blog.lovemily.me/a-deep-dive-guide-for-crawling-spa-with-puppeteer-and-troubleshooting/">A Deep Dive Guide for Crawling SPA with Puppeteer and Troubleshooting</a></p><p>TL;DR</p><ul><li>Crawl a SPA Page</li><li>Get Async/Ajax data</li><li>Navigate To Another Page</li><li>Troubleshooting while Deploying to Linux Systems</li></ul><h3>Crawl a SPA Page</h3><p>Before you start and open a webpage, you may also need to set a HTTP_PROXY/HTTPS_PROXY env to let your headless chrome request pages through the proxy to prevent being blocked by some anti-spider policies on which page you want to crawl.<br>Also if you are crawling a mobile page, you may want to emulate a mobile UA just like you do in your chrome dev tools, so you don’t need to call setUserAgent() method manually:</p><pre>const devices = require(‘puppeteer/DeviceDescriptors’);<br>const iPhone6 = devices[‘iPhone 6’];<br>…<br>const page = await browser.newPage();<br>await page.emulate(iPhone6);</pre><p>also to make your request more human-like, you can set some extra headers like Referer:<br>await page.setExtraHTTPHeaders({Referer: &#39;<a href="https://www.domain.com/langdingpage&#39;})%60">https://www.domain.com/langdingpage&#39;})</a> <br>Now you can really goto the page: <br>await page.goto(&#39;<a href="https://www.domain.com/page1&#39;)%60">https://www.domain.com/page1&#39;</a>)<br>By default, it will resolve until the `load` event fires, so you have all the html available for following steps.<br>Now you can save the html to file for use at some later time, you could use <a href="https://github.com/cheeriojs/cheerio">cheerio</a> to parse the html, and get some data from it:</p><pre>const cheerio = require(‘cheerio’);<br>//whole document html at the moment<br>const html = await page.content();<br>//save to file<br>fs.writeFile(‘build/content.html’, html, _ =&gt; console.log(‘done’));<br>//scrape that html conent<br>const $ = cheerio.load(html);<br>//now you use just like you do with jquery in browser<br>$(‘.title’).text();</pre><h3>Get Async/Ajax data</h3><p>So now you are in the initial state of the page, with only few information you want, the page may load more data as user scroll down the page continuously, so here you may simulate that you have scrolled down the page, and tell the page to load the next chunk of data. <br>Before you do that, you need to go to the page in a real browser, and analyze how the page works, like in which element every item is wrapped(e.g li or a div), what is the ajax call(the url), what the pagination parameters look like, how the response data structured, and how you can check that all the data has been loaded…, yes, there are lots of preparation you need to do before you get the data you want.<br>So here suppose the page has a list of data, and we will need to scroll the page to load more data, one solution is that you get the last element like li, and scroll that into view inside evaluate():</p><pre>await page.evaluate(() =&gt; {<br> const lastLi = document.querySelector(‘ul.list &gt; li:last-child’);<br> if(lastLi) {<br>   lastLi.scrollIntoView();<br> }<br>});</pre><p>And then an ajax request will be triggered, but how you can get that response data? You may want to ask why the hell I need to get the request response data, I only need to want some time, and query through the DOM, get the newly added elements, and scrape the texts inside, and that’s done. Yes, that’s another way to scrape the data from html directly, but the benefits of intercepting the requests are that you can get all the raw data, and can be easily mapped to your own data structure, also the content displayed in html may be formatted from the raw data, like a displayed date may only be like “5 minutes ago”, but what we need is a milliseconds value with all date info within it.<br>The way is that we use request and response events to listen for all the requests that the browser triggers, usually you only need to listen on response event since you only need response data:</p><pre>let allData = [];<br>page.on(‘response’, async res =&gt; {<br> //get and parse the url for later filtering<br> const parsedUrl = new URL(res.url);<br> //filter out the requests we do not need, or when the request fails<br> if(parsedUrl.pathname != ‘/needed/ajax/url’ || !res.ok) return;<br> //do with the json data, e.g:<br> const data = await res.json();<br> // no more data<br> if(!data.list) return;<br> //add data to a single array for later use<br> allData = allData.concat(data.list);<br> //now you can trigger the next scroll<br> //do the same above to get the updated last li, and scroll that into view…<br>})</pre><p>You should wrap these sequence actions into a Promise so that you can resolve that after you get all the data, and continue to the next step:</p><pre>async function getListData(url) {<br> return new Promise(async (resolve, reject) =&gt; {<br> const page = await browser.newPage();<br> page.on(‘response’, async res =&gt; {<br> if(allDataReceived) {return resolve(allData)}<br> if(err) {return reject(err);}<br> do with the data…<br> });<br> page.goto(url);<br> });<br>}</pre><p>*<em>Don’t forget that if you want to pass params from your node context to </em><em>evaluate()(browser context), you need to pass them to the callback</em>*</p><pre>const p1 = 1;<br>//if you don’t add p1 after the callback, you cannot access `p1` in the callback, which will throw exception<br>const p2 = await page.evaluate(p1 =&gt; p1 * 2, p1);</pre><h3>Navigate To Another Page</h3><p>After getting all the data on the current page, you may want to navigate to another page to fetch some other data, So you need to query some element like an a tag, and click on that:</p><pre>const ele = await page.$(‘a.next-page’);<br>await ele.click({delay: 300});</pre><p>then wait the new page loaded, and get new data, there are couple of ways to wait the second page to be loaded:</p><pre>//1.wait for a specific element to be available in 2nd page:<br>await page.waitForSelector(‘#page2 ul.datalist2’);<br>//2. listen on a “load” event when loading page:<br>page.on(‘load’, async () =&gt; {<br> console.log(‘load event! new page html…’);<br> const html = await page.content();<br> …<br> });<br>//also listen on a “framenavigated” event when navigating to another url<br>page.on(‘framenavigated’, frame =&gt; {<br> console.log(`new url: ${frame.url()}`);<br> …<br> });</pre><p>After everything is done, close the page and the headless browser:<br>await page.close(); browser.close();</p><h3>Troubleshooting while Deploying to Linux Systems</h3><p>So far everything looks great when you develop your crawler on your Mac or Windows, and then you try to deploy that on your linux server, holy crap:(, lots of exceptions when you start the crawler, then you start a long journey searching google, searching github, trying to find what the hack is wrong😰.<br>Here I will list some resources and quick fixes for how to run puppeteer on a liunx machine.<br>I will use CentOS as a example here, first of all, you need to install couple of dependences on your system, for CentOS_7:<br>sudo yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc nss<br>Really a lots of stuff, but just do it! <br>For a Debian(like Ubuntu) system, check out the <a href="https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md">Puppeteer Troubleshooting wiki</a><br>After you install all the deps, and you are happy to try again, but couple of new error messages displayed on your console again:(</p><pre>Failed to launch chrome!<br>[1013/165824.375714:FATAL:zygote_host_impl_linux.cc(123)] No usable sandbox! Update your kernel or see <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md">https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md</a> for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using — no-sandbox</pre><p>As the message says, the headless chrome runs inside a sandbox to prevent security issue to your system, and here no usable sandbox available, but actually when you install puppeteer, the sandbox is also installed along with the headless chrome bundle, you just have to do some more configuration. <br>But if you really want to run your crawler now, you can run with “ — no-sandbox” option which put your system into a dangerous environment, which is highly discouraged:</p><pre>const browser = await puppeteer.launch({<br> args: [&#39;--no-sandbox&#39;, &#39;--disable-setuid-sandbox&#39;],<br>});</pre><p>So let’s do a little more work to make your system less dangerous with sandbox enabled(*<em>CentOS 7.3+ may not need this, but CentOS-7.2 needs those steps</em>*):<br>1. go to your puppeteer installed dir(here puppeteer@0.12.0):<br>cd ${project_root}/node_modules/puppeteer/.local-chromium/linux-508693/chrome-linux<br>2. change owner &amp; privileges for chrome_sandbox:<br>sudo chown root:root chrome_sandbox &amp;&amp; sudo chmod 4755 chrome_sandbox <br>3. set CHROME_DEVEL_SANDBOX env, every time when puppeteer runs, this env should be available otherwise the sandbox cannot run, so it’s better to set this into your .bashrc or your deploy script:<br>export CHROME_DEVEL_SANDBOX=&quot;$PWD/chrome_sandbox&quot; or with full path <br>export CHROME_DEVEL_SANDBOX=&quot;${project_root}/node_modules/puppeteer/.local-chromium/linux-508693/chrome-linux/chrome_sandbox&quot;</p><p>And that should fix the issue when running puppeteer in a linux system, cheers:).</p><h4>Conclusion</h4><p>puppeteer has been released for only couple of weeks by the time this article was posted, but with the power of the most popular browser in the world, we can use all the latest features provided by Chrome to test our modern SPA applications, generate static html, crawling, and much more:)<br>Happy modern headless life with <a href="https://github.com/GoogleChrome/puppeteer">puppeteer</a>😎</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d4bea646dd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>