<?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[Medvine Tech - Medium]]></title>
        <description><![CDATA[Medvine is a B2B E-commerce marketplace that disrupts the distribution and sale of disposable medical products in South East Asia. - Medium]]></description>
        <link>https://medium.com/medvine?source=rss----798fbf47c919---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Medvine Tech - Medium</title>
            <link>https://medium.com/medvine?source=rss----798fbf47c919---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:03:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/medvine" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Play around with Socket.io and Typescript]]></title>
            <link>https://medium.com/medvine/play-around-with-socket-io-and-typescript-c889d391ed00?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/c889d391ed00</guid>
            <category><![CDATA[socketio]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Sat, 16 Feb 2019 13:03:14 GMT</pubDate>
            <atom:updated>2020-06-07T04:50:53.710Z</atom:updated>
            <content:encoded><![CDATA[<p>I heard about socket.io many time, reading what it can do and benefit of socket.io but never have to play with it. at <a href="http://www.medvine.com/">Medvine</a> we have application that use socket.io to control even of application. so I decide to get my hand dirty and start playing with it. of course I will integrate with Typescript — the best subset of javascript language.</p><h3>What is Socket.io</h3><p><a href="https://socket.io/">Socket.io</a> is javascript library design for long-pull connection between browser and server. which mean data will update every time if server got data from browser. then server will update data and send to browser again. the best example in real world that can use this technology is chat application. when someone join that room and type somethings. that massage will send to server and server will response back by send that message to all user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYbE6-vGUmbOA8L86DHPZw.gif" /><figcaption>Example of Real world application</figcaption></figure><p>On picture above Socket.io is watching hashtag on twitter. if some one tweet about watching hashtag. web application will display it on realtime.</p><h3>So what is challenge for today?</h3><p>We will create one application. this application will connect to demo website for grab user information by using <a href="https://www.npmjs.com/package/axios"><strong>Axios</strong></a> and grab it by async function(parallel request). like this picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XAP5f34iR8oO81I-RfpU6w.png" /><figcaption>50 request with async (parallel)</figcaption></figure><p>All 50 request will fire from application in one time. all data will fire to server without waiting for response. and when all of it complete we need Socket-io to show which one is complete.</p><h3>OK. let start Implement this one.</h3><p>first we need to create new folder for this project. then start create package.json by using this command</p><pre>yarn init -y</pre><p>Then install these packages.</p><pre>yarn add axios express http socket.io socket.io-client</pre><p>And dev dependencies packages.</p><pre>yarn add <a href="http://twitter.com/types/express">@types/express</a> <a href="http://twitter.com/types/socket">@types/socket</a>.io <a href="http://twitter.com/types/socket">@types/socket</a>.io-client concurrently nodemon typescript -D</pre><p>You will notice we use typescript. so we need to install all of types and we use concurrently for execute 2 command in one time for running <strong><em>Typescript</em></strong> complier code and <a href="https://www.npmjs.com/package/nodemon"><strong><em>nodemon</em></strong></a> for watching file which file is changing. add this script to package.json file</p><pre>&quot;scripts&quot;: {<br>    &quot;dev&quot;: &quot;concurrently \&quot;tsc -w\&quot; \&quot;nodemon dist/app.js\&quot;&quot;<br>  },</pre><p>Our package.json file will be like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a29af8914566e20812a523a7469c1db/href">https://medium.com/media/3a29af8914566e20812a523a7469c1db/href</a></iframe><h3>tsconfig.json file.</h3><p>When we use <em>Typescript</em>. this file will be typescript setting. most of the time we will use same pattern. just copy and past this code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f136c0b94e72fbcf37935bb0c77e90df/href">https://medium.com/media/f136c0b94e72fbcf37935bb0c77e90df/href</a></iframe><p>if you want more explanation. see this article <a href="https://medium.com/medvine/combine-typescript-with-nextjs-and-express-438b9c0b3f70"><strong><em>Combine Typescript with NextJS and Express</em></strong></a></p><h3>Hello world from Express</h3><p>We need to use <a href="https://expressjs.com/"><strong><em>Express</em></strong></a> to display some message. for make sure we can working on server side. we need to put these code on file<em> app.ts</em></p><pre>import express, { Request, Response } from &#39;express&#39;;<br>const app = express();<br>const server = require(&#39;http&#39;).Server(app);<br>const port = 3000;</pre><pre>app.get(&#39;/&#39;, (req: Request, res: Response) =&gt; {<br>  res.json({ data: &#39;hello world&#39; });<br>});</pre><pre>server.listen(port, () =&gt; console.log(`Example app listening on port ${port}!`));</pre><p>Then run command</p><pre>yarn dev</pre><p>This command will complier<em> app.ts</em> file to <em>dist/app.js</em> file which is we have nodemon to watching it. when nodemon got file. will running server on port 3000. you will see result at <a href="http://localhost:3000/">http://localhost:3000/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*4-dWEMjfoTbDMf_eClszDw.png" /><figcaption>Result from server</figcaption></figure><h3>Socket.io and Axios</h3><p>We need socket.io to know when <strong><em>Axios</em></strong> request to get users data success. but firstly we need to create room for socket.io for waiting event from <a href="https://www.npmjs.com/package/socket.io-client"><strong><em>socket.io-clien</em>t</strong></a>.</p><pre>import ioserver, { Socket } from &#39;socket.io&#39;;<br>import ioclient from &#39;socket.io-client&#39;;<br>const io = ioserver(server);</pre><pre>io.on(&#39;connection&#39;, (socket: Socket) =&gt; {<br>  socket.on(&#39;my other event&#39;, (data) =&gt; {<br>    console.log(&#39;I got data. will running another function&#39;, data.count);<br>  });<br>});</pre><p>And create function fetchUsers</p><pre>const fetchUsers = (socketclient: SocketIOClient.Socket, incrementId: number) =&gt; {<br>  // fetch data and send response back to socket io.<br>  const fetchUsers = axios<br>    .get(&#39;<a href="https://jsonplaceholder.typicode.com/users&#39;">https://jsonplaceholder.typicode.com/users&#39;</a>)<br>    .then((result) =&gt; {<br>      socketclient.emit(&#39;my other event&#39;, { data: result.data, count: incrementId });<br>      return result.data;<br>    })<br>    .catch((error) =&gt; error.message);</pre><pre>return fetchUsers;<br>};</pre><p>When fetch user complete. socket.io-client will send message to notify to socket.io and socket.io will process and show message which request is complete.</p><p>This is code for complete file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53c42d9f04672155fe6de7c563e40503/href">https://medium.com/media/53c42d9f04672155fe6de7c563e40503/href</a></iframe><p>And this is result. all request will fire to server in same time and response will come back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Z3Y_c9a7RWjr4J9MujaAg.png" /><figcaption>Result of request from axios</figcaption></figure><p>So we can do more things with this concept like process that response when response come back from server. add them to database or notify to user that we got data already. it depend on you design.</p><p>If you like this article don’t forget to give me some clap. any suggestion are welcome on comment section.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><p>get code on my github.</p><p><a href="https://github.com/klogic/socket-io-playground">klogic/socket-io-playground</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c889d391ed00" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/play-around-with-socket-io-and-typescript-c889d391ed00">Play around with Socket.io and Typescript</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Increase coding productivity with VSCode + Vim]]></title>
            <link>https://medium.com/medvine/increase-coding-productivity-with-vscode-vim-a101d5772cd0?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/a101d5772cd0</guid>
            <category><![CDATA[vscode-extension]]></category>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 12:09:08 GMT</pubDate>
            <atom:updated>2020-06-07T04:51:10.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*4sSXZd7Tk1HHvdb2AGmRAg.png" /><figcaption>VSCodeVim</figcaption></figure><p>I heard my friend talking about vim at middle of last year. at that time I just listen and not give a try. but in last month I just started integration vim plugin call <a href="https://github.com/VSCodeVim">VSCodeVim</a> with VSCode.</p><p>Why shoud I use vim?</p><p>The most benefit that I heard about it instead of you moving curror in plugin with arrow key you can move with h, j, k , l. that make you hand stick at keyboard all the time. don’t waste you time to switch hand to arrow key, trackpad or mouse. you can search text and goto specific word on that line. or jump to line you want. or just copy with V key and that select range you want. and I will show how powerful it is in.</p><h4>Use h j k l for moving cursor. instead of arrow key.</h4><p>use h for go left.<br>use j for go down (j look like down arrow).<br>use k for go up.<br>use l for go right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GhRjQZ696hfe5rFyLYNzQ.gif" /><figcaption>use h, j, k, l for move cursor.</figcaption></figure><h4>Go to specifics line</h4><p>Vim introduce feature that will leading you to line you want. just type &lt;line&gt; follow with G it will lead you to that line. for this example I will go to line 5, 10, 15, 20, 27 very fast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*91n-uOEHrvSQLJT_FtVMBg.gif" /><figcaption>use &lt;line&gt;G will move cursor to specific line pretty fast</figcaption></figure><h4>Go to specifics character in that line.</h4><p>While I coding, sometime need to go to specifics word on that line for start adding more code. normally I use option key and arrow to move. but for vim. we have w to move. this will be same behavior line option key. but I love to search text in that line by using F&lt;Char&gt; for search. it will lead me to the word start with &lt;Char&gt; that I type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sajfP4H57AfMcdMSYQ9Ekg.gif" /><figcaption>search char with f&lt;char&gt;, here I use fv, fw, fw, f, and f1</figcaption></figure><h4>Copy and paste “single line”</h4><p>For copy and paste code in select line. use yy for copy and p for paste</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vd6zxC8V8mSfu2yYwDIuTQ.gif" /><figcaption>use yy and p for copy single line and paste</figcaption></figure><h4>Copy and paste “multiple line”</h4><p>For copy and paste multiple. use V to enter “visual mode” then select line with j and use Y for copy and p for paste</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VMXW7u-74E-h-2L4aMHE7A.gif" /><figcaption>use V to select line and copy with Y and past with P</figcaption></figure><h4>Delete one line</h4><p>When need to delete single line. it easy just use dd for delete. that’s it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2eNvrrMKU4UdFbg021InQ.gif" /><figcaption>delete one line with dd</figcaption></figure><h4>Conclusion.</h4><p>Vim have a lot of command that lead me to move cursor around. split screen. find word and replace and more. it will increase you productivity and make me write code more enjoy. my advice is. give it a try with open mind. you will find new world.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a101d5772cd0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/increase-coding-productivity-with-vscode-vim-a101d5772cd0">Increase coding productivity with VSCode + Vim</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things I’ve learn from working at Medvine Limited.]]></title>
            <link>https://medium.com/medvine/things-ive-learn-from-working-at-medvine-limited-bc822af72444?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc822af72444</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[medvine]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:54:06 GMT</pubDate>
            <atom:updated>2020-06-07T04:54:07.354Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYmJ26Xb9Xo5QAjRIyentQ.jpeg" /></figure><p>I start working at <a href="https://www.medvine.co/">Medvine Limited</a> in Oct 2017 as python software engineer. I have responsibility on backend side.at Medvine we use backend platform that 100% open source call Odoo and integrate with Magento as a frontend. by using this platform give us a lot of control for operation flow and customer very satisfied on their experience. we start to grow from 0 customer and now we got over 1000 B2B customer.</p><p>At Medvine. I can’t describe what culture we have by text. but this article I will write my filling at working environment down. and let you decide what culture we are. I will summery what I’ve learn when first time I join on team until now.</p><ol><li><strong>Take Control &amp; Take Ownership</strong> — as a startup. we face a lot obstacle and try to push through it. every time we face that obstacle we communicate with team about problem. everyone can have idea and present it up in team meeting. or just walking directly to CEO , COO, CTO to present idea. but sometime I thing that idea need to make a quick decision and can help my team go through obstacle. I just decide it and make it happen rather than doing noting.</li><li><strong>Prioritize is skill, also art</strong> — when I bombarded with a lot of task. it cause me stressful and don’t know how to handle it. some task seem like to be urgent but it not that much urgent. in this case I need to communicate with team and understand why their think this task is urgent. some time have long discuss for finding the tipping point. but some task I have need to prioritize with myself which one is more important and decide to do that task for create most impact for everyone.</li><li><strong>Don’t be afraid to communicate </strong>— sometime I don’t know how to solve problem. maybe because I lack of information or can’t decide because it beyond my control(people from another department). I need to communicate with everyone who associated with that problem. some time have conflict but after that I can find final solution for that problem. it help me clear my head. get rid of strain and have more time to focus on positive thing instead of problem.</li><li><strong>Be honest, be true to yourself</strong> — I’m introvert guy. that mean when I have feeling I don’t express it or telling anyone what I felt. but that don’t help me to be happy. I alway avoid the conflict and try to make everyone have compatible agreement. I found out later if I express what I’m thinking, what I felt. and show them the reason why I think or felt like that. It make everyone can understand me and that cause me much happier than before.</li><li><strong>Willing to fail. embrace that feeling and go forward</strong> — when I afraid to fail it cause me to afraid on everything. can’t make decision. can’t look people in their eye. seeking where I comfortable rather than get out of comfort zone. but when I decide enough is enough. I will seeking how to fail. I want to fail. that does’t case me to be a loser in contrary it give me more stronger. I can enjoy doing think without care how another people think. when I fail I embrace it. remember it and try to make it better.this mindset help me to accelerate my growth.</li></ol><p>This is things I’ve learn from Medvine Limited. I have a lot of lesson to learn. time and knowledge will help me to growth. to be a great person. positive and happier. I just get exciting by imagine to that day. until next article. keep going forward.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc822af72444" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/things-ive-learn-from-working-at-medvine-limited-bc822af72444">Things I’ve learn from working at Medvine Limited.</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gitflow workflow vs Feature Branch workflow]]></title>
            <link>https://medium.com/medvine/gitflow-workflow-vs-feature-branch-workflow-8fb4c26571c5?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/8fb4c26571c5</guid>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[feature-branch-workflow]]></category>
            <category><![CDATA[gitflow]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:53:37 GMT</pubDate>
            <atom:updated>2020-06-07T04:53:55.029Z</atom:updated>
            <content:encoded><![CDATA[<p>Version control is very popular among software engineer. It give us more control about our code. reduce mistake &amp; easy to get back to version that we need. but which workflow is the best. this article will focus on two workflow. gitflow workflow vs feature branch workflow.</p><h3><strong>Git workflow</strong></h3><p>Core concept of gitflow workflow come from <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vincent Driessen</a>. this concept is working by split branch for each purpose.</p><ul><li>Master branch — This branch contain production of code base</li><li>Develop branch — This branch is develop branch.</li><li>Feature branch — This branch split from develop branch. in case we need new feature we must split it from develop branch. when this feature done. we need to combine back to develop</li><li>Release branch — This branch for release. checking everything before release. include write document about this release.</li><li>Hotfix branch — This branch for fix urgent bug on production.</li></ul><p>This is flow of git workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*C5NO_U9I5CIJWmPapDEVEQ.png" /><figcaption>Git Workflow</figcaption></figure><ol><li>Start master branch with initial commit</li><li>Create another branch for develop. this develop branch every developer with start every feature from here. by using command</li></ol><pre>git checkout -b develop</pre><p>3. We need to develop some feature. let say it is ‘first feature’ then we need to split develop branch to another branch for this specific feature. the feature branch must have prefix feature/&lt;feature_name&gt; where &lt;feature_name&gt; is the name of feature we need to name. in this case. we need to create feature/first-feature by using command</p><pre>git checkout -b &quot;feature/first-feature&quot;</pre><p>4. After finish feature. we need to merge back to develop branch and if we din’t use this branch we can delete it.</p><pre>git checkout develop<br>git merge &quot;feature/first-feature&quot;<br>git branch -D &quot;feature/first-feature&quot; // delete feature branch</pre><p>5. Sometime we need to write document on release version. we need to create release branch. the release branch must have prefix release/&lt;version_tag&gt;</p><pre>git checkout -b &quot;release/0.0.1&quot;</pre><p>6. when finish write document version. testing with this version without any problem. let merge it back to develop and master branch then delete it.</p><pre>git checkout develop<br>git merge &quot;release/0.0.1&quot;<br>git checkout master<br>git merge &quot;release/0.0.1&quot;<br>git branch -D &quot;release/0.0.1&quot; // delete release branch</pre><p>That is for gitflow workflow. but anyway there have a pro and con for this workflow.</p><h4><strong>Pro</strong></h4><p>Give lot more control for developer. you can change branch around. merge it together. delete un usage branch. also have command line tools for help call <a href="https://github.com/danielkummer/git-flow-cheatsheet">GIT FLOW</a>. you don’t need to create branch, create new branch by a long command.</p><h4>Con</h4><p>If you look at git graph by using command git log --all --decorate --oneline --graph you will see line of network is unclear. instead you picture you will see above graph. you will see this graph instead</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*rnLkhwqAJm7wpzHRgN03eQ.png" /><figcaption>Gitflow Workflow Real Graph</figcaption></figure><h3>Feature Branch workflow</h3><p>This concept come from popular Github. 3rd service for provide code storage version control. the concept it self is pretty easy. remote our code to remote repository that online on github. push it. if have any feature. we need pull request it before project owner review code. and merge it to master branch.</p><p>Let say if we need to use flow like git workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*C5NO_U9I5CIJWmPapDEVEQ.png" /><figcaption>Git workflow</figcaption></figure><ol><li>Initial project with git. then add remote with our repository on github with command git remote add origin &lt;repo_github&gt; where &lt;repo_github&gt; is your project repository on github.</li></ol><pre>git remote add origin <a href="/service/mailto:git@github.com">git@github.com</a>:klogic/git-release.git<br>git push origin master</pre><p>2. Create Develop branch</p><pre>git checkout -b develop</pre><p>3. Create feature branch</p><pre>git checkout -b &quot;feature/first-feature&quot;</pre><p>4. After finish feature. we need to push to feature branch</p><pre>git push origin feature/first-feature</pre><p>5. Pull request on github for requst to merge it to develop branch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRJ8ZpPqwW5PjfMPMQSv2A.gif" /><figcaption>step to pull request.</figcaption></figure><p>6. After we merge it to develop branch then we can delete branch on remote repository and local repository</p><pre>git push origin feature/first-feature --delete // del remote branch<br>git branch -D feature/first-feature // del local branch</pre><p>7. Then replace above step with release branch.</p><p>So we need to look at pro and con with feature branch workflow</p><h3>Pro</h3><p>If you want to look at pretty network graph. this one graph very beautiful. the picture is same with git workflow. easy to show people in your team what are you working. which feature come first so we can decide how to merge in case our code have conflict.</p><h3>Con</h3><p>So many click to get the job done. but you can use tool for help pull request by using <a href="https://github.com/github/hub">Hub Command</a>. also this feature need to rely on 3party service.</p><h3>Summary</h3><p>It’s not about which one is better. it should be depend on your team what environment you want to use. which one is suitable with you challenge. easy to manage and maintainable. you need to play it and find with one is better for your team.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fb4c26571c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/gitflow-workflow-vs-feature-branch-workflow-8fb4c26571c5">Gitflow workflow vs Feature Branch workflow</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Puppeteer. make you self at chrome.]]></title>
            <link>https://medium.com/medvine/puppeteer-make-you-self-at-chrome-4afd21514f13?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/4afd21514f13</guid>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:53:23 GMT</pubDate>
            <atom:updated>2020-06-07T04:53:24.637Z</atom:updated>
            <content:encoded><![CDATA[<h3>Puppeteer. make yourself at chrome.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*wgkUuIPalQJ1MjyMRgJSTA.png" /></figure><p>I facing a lot problem when trying scrape website via programming. one of that thing is some website have high security and I can’t get through if using normal Curl Request (actually I can by simulate header of request for clam i’m real browser). but for this library you can literally get through everything by easy because you on chrome.</p><h4>What is Puppeteer?</h4><p>Puppeteer is Node library develop by google. make for simulate like you on Chrome itself. you can do everything in there like get page. checking are that page available?. testing and debugging include save that page to images or pdf file.</p><p>Normally Puppeteer will run on Chromium. which is another version of Chrome but open source project. some project will develop and release on Chromium first for check feedback and then improve before adjust that feature to Chrome.</p><h4>Getting Start</h4><p>First we need to install Puppeteer.</p><pre>yarn add puppeteer</pre><p>Then we will take screen short of <em>https://www.google.com</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/12c667a8aec813a20f741cd6aacf877d/href">https://medium.com/media/12c667a8aec813a20f741cd6aacf877d/href</a></iframe><p>If we look at path that we run file. we will see <em>example.png</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*aAG-mfz7UCxg6z2NJ4wYmg.png" /><figcaption>example.png</figcaption></figure><p>Puppeteer also can make automate browser test like Selenium. this code will show you how to input data in input field. we will search <strong><em>cat vs cucmber</em></strong> in youtube and auto get inside first clip that we found.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e82070ca49d49fbdc9e0cc2e5812d69d/href">https://medium.com/media/e82070ca49d49fbdc9e0cc2e5812d69d/href</a></iframe><p>Hooray. we can watching cat by single command line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T4tR5NJmw0_3piy0D5tZXw.gif" /></figure><p>That is for Puppeteer. now I will leave it to you to play around with it and you will see how powerful it is. if you like this article. don’t forget give me a big clap.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4afd21514f13" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/puppeteer-make-you-self-at-chrome-4afd21514f13">Puppeteer. make you self at chrome.</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Puppeteer. Automate sending report summary to CEO]]></title>
            <link>https://medium.com/medvine/puppeteer-automate-sending-report-summary-to-ceo-f8631d0af5c6?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8631d0af5c6</guid>
            <category><![CDATA[medvine]]></category>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[automate]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:53:08 GMT</pubDate>
            <atom:updated>2020-06-07T04:52:44.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBbYsFJAAOqGeh4GyghJsA.png" /><figcaption>Example data — Geckoboard</figcaption></figure><p>At Medvine. We use Geckoboard for visualize business data such as gross merchandise volume, average order value, new customer per month, order total per month. these data help for analysis business and planing marketing strategies. so it very important to send summary every 11.59 PM(the end of the day) to CEO every day.</p><p>From previous article <a href="https://medium.com/@klogic/puppeteer-make-you-self-at-chrome-4afd21514f13">Puppeteer. Make yourself at chrome.</a> I already present how to use Puppeteer to do automate things with web browser. In this article I will present how to use them in real world project which is auto send email of Geckoboard data to CEO every 11.59 PM.</p><h4>Let Code!</h4><p>In NodeJs. have package to help us to catch the time we want then trigger the function to execute. that package is <em>node-cron</em>.</p><pre>// install<br>yarn add node-cron</pre><p>then at <em>server.js</em> file. we need to set time for execute</p><pre>const cron = require(&#39;node-cron&#39;);</pre><pre>cron.schedule(&#39;0 59 23 * * *&#39;, function (){<br>   // function will execute every 11.59 pm<br>}</pre><p>Then in function. I use Puppeteer to open website. then take screenshot and save in local directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0886bb05845b432e715ee9062403fb00/href">https://medium.com/media/0886bb05845b432e715ee9062403fb00/href</a></iframe><p>line 10–13: in linux we need to tell chromium do not running with GPU otherwise chromium will stop working.</p><p>line 15: I set viewport for get height resolution otherwise image will not clear.</p><p>And next we need to install package call <em>nodemailer</em> for help us to sending email easier.</p><pre>// install<br>yarn add nodemailer</pre><p>Then make function call sendmail</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8be46f79734652896f799e64811d8375/href">https://medium.com/media/8be46f79734652896f799e64811d8375/href</a></iframe><p>This function will sendmail to people we add in mailOpstions. when email send successfully. we will delete screenshot file in our server.</p><p>And don’t forget to call this function. just add this after <em>await browser.close();</em></p><pre>await browser.close();<br>sendmail(todaydate)</pre><p>And we got email from Bot like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*m15wLAId9uxFY3sOvLnOOg.png" /><figcaption>email from Medvine bot</figcaption></figure><p>Puppeteer can make everything that you can imagine. now imagine and start write code!</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8631d0af5c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/puppeteer-automate-sending-report-summary-to-ceo-f8631d0af5c6">Puppeteer. Automate sending report summary to CEO</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install ESLint global with Airbnb-style-guide and use it in VSCode.]]></title>
            <link>https://medium.com/medvine/install-eslint-global-with-airbnb-style-guide-and-use-it-in-vscode-d752dfa40b21?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/d752dfa40b21</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[style-guides]]></category>
            <category><![CDATA[airbnb]]></category>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:52:53 GMT</pubDate>
            <atom:updated>2020-06-07T04:52:30.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*4m16kDURwTGuHwR92Y4ozw.png" /></figure><p>Currently I get hook by development process. I got a ton of question of my mind. how can I build team with the same standard?. how to make code easy to maintain and make code seem write by one person?. which standard that big company using?. then I found <a href="https://github.com/airbnb/javascript">Airbnb javascript style guide</a> that I very impress how clean of coding they are. so I will use this style guide with ESLint for make my code same standard as them.</p><h4>Install ESLint Global.</h4><p>You can install ESLint with Airbnb style guide with NPM by single command.</p><pre>npm i eslint eslint-config-airbnb-base eslint-plugin-import -g</pre><p>After finish install. go to you user directory for setup configuration file.</p><pre>cd ~/<br>pwd // check your path. you should be in /Users/&lt;YOUNAME&gt;</pre><p>Then create config file for ESLint. and open it.</p><pre>touch .eslintrc<br>code .eslintrc</pre><p>Add config file like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6ff3a97006798b2412fec2cdd9b9016/href">https://medium.com/media/e6ff3a97006798b2412fec2cdd9b9016/href</a></iframe><p>Then in VSCode. Open Extensions menu(Cmd+Shift+x). search for <em>ESLint </em>and Install it.</p><p>After Successfully install and restart VSCode. we good to go with ESLint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYQ1Kp1lIwMYzAOc8H_yaQ.gif" /><figcaption>Example using ESLint in VSCode</figcaption></figure><p>That is. after this when you found problem. you can read documentation of <a href="https://github.com/airbnb/javascript">Airbnb javascript style guide</a>. for follow the rule and standard of them. and if you need to add more standard or another plugin. you can use npm for install and add more extends in <em>.eslintrc</em> file.</p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d752dfa40b21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/install-eslint-global-with-airbnb-style-guide-and-use-it-in-vscode-d752dfa40b21">Install ESLint global with Airbnb-style-guide and use it in VSCode.</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React with Firebase Authentication]]></title>
            <link>https://medium.com/medvine/react-with-firebase-authentication-47ae6442e442?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/47ae6442e442</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[firebaseauthentication]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 16:52:40 GMT</pubDate>
            <atom:updated>2020-06-07T04:52:10.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*TRPgsbcbM2_RB3t79QFHUQ.png" /></figure><p>Your might heard the world <strong>React</strong> and <strong>Firebase </strong>but don’t know with it is exactly. so today I will explain to you and demonstrate with authentication example. so let get started.</p><h4>What about React?</h4><p><strong><em>React</em></strong> is very popular on web technology world. React create by facebook. they focus is create single page application for purpose try to give more user experience for user when user visit website. if you notice the facebook feed. you can see last update of your friend without refresh web browser. also notification that will popup without you doing anythings. that the power of react.</p><h4>What is Firebase?</h4><p>The easy way to explain is firebase is a platform develop by google. they provide a backend service for easy to start building web application without worry about server or service behind the scene. firebase have feature like <strong><em>Realtime database</em></strong>,<strong><em> push notification</em></strong>,<strong><em> firebase analysis</em></strong>, <strong><em>firebase cloud message </em></strong>etc. but today we will focus on service that provide authentication for us. <strong><em>Firebase authentication.</em></strong></p><h4>Prepare for working.</h4><p>Before getting started. make sure you have this following list installed</p><ul><li>Npm or Yarn</li><li>Nodejs</li></ul><p>Install <strong><em>create-react-app</em></strong> by use this command</p><pre>npm i create-react-app -g</pre><p>Then create react project by using command</p><pre># create-react-app &lt;project_name&gt;<br>create-react-app firebase-auth</pre><p>We will use <strong><em>Bootstrap</em></strong> for front-end. we add <em>bootstrap</em> by command</p><pre>npm install bootstrap --save</pre><p>And on top of <strong><em>index.js </em></strong>file. we import bootstrap so we can use it in our app</p><pre>import &#39;bootstrap/dist/css/bootstrap.min.css&#39;;</pre><p>Install <strong><em>react-router-dom</em></strong> for create path and link to controll pages.</p><pre>npm install react-router-dom --save</pre><p>And install firebase</p><pre>npm install firebase</pre><h4>Let Coding</h4><p>File structure should be like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/243/1*IuxG7Jk-u0x_q6vpCnUXmQ.png" /></figure><p>Split <strong><em>App.js</em> </strong>Code to difference component for easy to maintain by start with create <strong><em>navbar.js</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a7078164d13d755233e6e4514fa2a05/href">https://medium.com/media/8a7078164d13d755233e6e4514fa2a05/href</a></iframe><p>Then we import <em>navbar</em> to <strong><em>App.js</em></strong> by put at the top of <em>App.js</em> file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39e0cdfda642893c59a9f036383ba322/href">https://medium.com/media/39e0cdfda642893c59a9f036383ba322/href</a></iframe><p>We use <strong><em>&lt;Route&gt;</em></strong> for control path that got from url. it will show component that we setup. that why we need to create <strong><em>Login</em></strong> and <strong><em>Register</em></strong> component for render it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee5aaf9c02e1a8e4c103c34aa80a3594/href">https://medium.com/media/ee5aaf9c02e1a8e4c103c34aa80a3594/href</a></iframe><p>On register process. we create input field and when we type on that field. we need to <strong><em>setState</em></strong> on function <strong><em>inputHandle</em></strong> so we can get value from it. after that when we submit it will trigger <strong><em>register</em></strong> function. that function will register our user on firebase authentication and when register success we will render component <strong><em>ShowProfile.</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b68d3d66ad8727eebc79c437695a661e/href">https://medium.com/media/b68d3d66ad8727eebc79c437695a661e/href</a></iframe><p>This is result of register process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0eY8-V22G6kQLCrftc4Wg.gif" /></figure><p>Ok, register working so we do login process next. by create <strong><em>Login</em></strong> component.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0f311ea48ea89fe9a96c721564fcb29a/href">https://medium.com/media/0f311ea48ea89fe9a96c721564fcb29a/href</a></iframe><p>This similar with register process. we <strong><em>setState</em></strong> of input field and when user click login will trigger <strong><em>Login </em></strong>function. that we will set state and send user to <strong><em>showProfile</em></strong> pages.</p><p>And this is result when login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vQ35vn6B5lfGqTEeHCgeQ.gif" /></figure><p><strong>Firebase Authentication </strong>can provide us more convenience to manage user. if you want to explore more check at <a href="https://firebase.google.com/">Firebase.com</a></p><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><p>And if you want to run my code just check it here.</p><p><a href="https://github.com/klogic/firebase-auth">klogic/firebase-auth</a></p><p>See you on next article, enjoy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47ae6442e442" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/react-with-firebase-authentication-47ae6442e442">React with Firebase Authentication</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Combine Typescript with NextJS and Express]]></title>
            <link>https://medium.com/medvine/combine-typescript-with-nextjs-and-express-438b9c0b3f70?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/438b9c0b3f70</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Narongsak Keawmanee]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 05:21:39 GMT</pubDate>
            <atom:updated>2020-06-07T04:51:35.687Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqXBxVx1Qh7dSCzsG7U-KQ.png" /></figure><p>Today we will setup project from scratch and combine <strong>TypeScript</strong>, <strong>NextJS</strong> and <strong>Express</strong> together. at <a href="https://www.medvine.co/"><strong>Medvine</strong></a> we had NextJs combine with Express to be standard stack for internal service. and today I will add Typescript into that stack. so let get started.</p><h4>Install standard NextJS with Typescript</h4><p>NextJs provide script that will lead us to getting started with NextJs and Typescript easier by this command.</p><pre>npx create-next-app --example with-typescript &lt;project_name&gt;</pre><p>Let run <strong>yarn dev</strong> and see what we got at <a href="http://localhost:3000/">http://localhost:3000/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*8EjIZrMyIwjqdvIPYH1M-Q.png" /><figcaption>first page created by create-next-app</figcaption></figure><p>And if we look and <strong>pages</strong> directory. we will see file <strong>index.tsx </strong>and <strong>about.tsx </strong>which is extension of typescript file.</p><p>Then we need to install express</p><pre>yarn add express <br>yarn add <a href="http://twitter.com/types/express">@types/express</a> nodemon --dev // for typescript checker</pre><p>We need to create file name <strong>server.tsx </strong>for run express and use this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ad69545fd21d8b33abdc9fa7333405e/href">https://medium.com/media/2ad69545fd21d8b33abdc9fa7333405e/href</a></iframe><p>Change script on <em>package.json </em>file to.</p><pre>&quot;scripts&quot;: {</pre><pre>    &quot;dev&quot;: &quot;nodemon -w controllers -w server.tsx --exec yarn type-check&quot;,</pre><pre>    &quot;build&quot;: &quot;next build&quot;,</pre><pre>    &quot;start&quot;: &quot;next start&quot;,</pre><pre>    &quot;type-check&quot;: &quot;tsc &amp;&amp; node dist/server.js&quot;</pre><pre>}</pre><p>On dev command we use <strong>Nodemon</strong> to watch file change at folder controllers and file <em>server.tsx.</em> if have any change will run type-check command and run <em>dist/server.js</em></p><p>And we need to change config at <em>tsconfig.json </em>like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0174d43fe34d9f8a09ad4feac3af48e5/href">https://medium.com/media/0174d43fe34d9f8a09ad4feac3af48e5/href</a></iframe><p>outDir — directory of output files after compiled script.<br>jsx — need to be <em>react</em> for es6 command.<br>module — use <em>commonjs</em> so we can use es6 import.<br>include — source directory of file before complier.</p><p>Then run yarn build for build NextJS first and after that we run yarn dev for watch file and complier.</p><p>Goto <a href="http://localhost:3000/">http://localhost:3000/</a> we will see same pages. but this time we see log that said server ready on port 3000. that mean we combine express to this project successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*vcwNF92dOsqQ8LRY_pQuBA.png" /><figcaption>result of yarn dev</figcaption></figure><p>Next step. we need to create controller endpoint. create new folder call <em>controllers</em> and create file name<strong> </strong><em>hi.tsx</em><strong> </strong>then add this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/18ea0565d51d865dbadcd71bf29c8f4b/href">https://medium.com/media/18ea0565d51d865dbadcd71bf29c8f4b/href</a></iframe><p>Go back at <em>server.tsx </em>file. import <em>hi.tsx </em>and use this controller at app block scope. the complete file should look like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96601a9bb851a03e11a3ed98691a0471/href">https://medium.com/media/96601a9bb851a03e11a3ed98691a0471/href</a></iframe><p>Then run <a href="http://localhost:3000/hi">http://localhost:3000/hi</a> we will see result of new endpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*Ys2P8G2OU_hV8xdNpgRPyw.png" /><figcaption>result at http://localhost:3000/hi</figcaption></figure><p>I appreciated all cup of coffee. you can donate coffee at button below.</p><figure><a href="https://www.buymeacoffee.com/klogic"><img alt="https://www.buymeacoffee.com/klogic" src="https://cdn-images-1.medium.com/max/434/1*Ch0FndijpCthaApqB1WJbg.png" /></a></figure><p>Now we can use Typescript with NextJS and Express. you can look all source code here.</p><p><a href="https://github.com/klogic/next-typescript-express">klogic/next-typescript-express</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=438b9c0b3f70" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/combine-typescript-with-nextjs-and-express-438b9c0b3f70">Combine Typescript with NextJS and Express</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native ฉบับเริ่มต้น]]></title>
            <link>https://medium.com/medvine/react-native-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99-d028f583413d?source=rss----798fbf47c919---4</link>
            <guid isPermaLink="false">https://medium.com/p/d028f583413d</guid>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Sakol Assawasagool (koobitor)]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 04:56:55 GMT</pubDate>
            <atom:updated>2018-07-24T14:49:31.655Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pVADMYS0_WAA0EcIsLWHA.png" /></figure><p><a href="https://github.com/facebook/react-native">React Native</a> ช่วยให้คุณสามารถสร้าง Mobile Application ใช้เพียงภาษา Javascript โดยลักษณะโครงสร้างการเขียนเหมือน React เลย สามารถเรียกใช้ Mobile User Interface จาก Components ต่างๆที่มีให้ใช้มากมาย</p><p><a href="https://github.com/expo/expo">Expo client app</a> เป็น Application ที่ช่วยให้เราเทสการแสดงผลได้บน <a href="https://itunes.apple.com/th/app/expo-client/id982107779?mt=8">iOS</a> และ <a href="https://play.google.com/store/apps/details?id=host.exp.exponent&amp;hl=en">Android</a> โดยตัว Expo ก็เป็น React Native Apps เช่นเดียวกัน ภายในก็จะมี <a href="https://docs.expo.io/versions/latest/sdk/index.html#expo-sdk">Expo SDK</a> ซึ่งทำหน้าที่ช่วยให้เราสามารถเรียกใช้งาน ฟังก์ชั่นต่างๆเช่น camera, contacts, local storage และ อื่นๆที่เกียวกับ Hardware</p><p><a href="https://github.com/react-community/create-react-native-app">create-react-native-app</a> คือ Command Line Tools ที่จะช่วยคุณเริ่มต้นสร้างโปรเจค React Native ได้อย่างง่ายได้ โดย คุณสามารถพัฒนา Mobile Application ได้โดยไม่จำเป็นต้องติดตั้ง Xcode หรือ Android Studio เลย</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae0c01de4f3e393fad8d0abe8d6fadd5/href">https://medium.com/media/ae0c01de4f3e393fad8d0abe8d6fadd5/href</a></iframe><p>คำสั่งที่เราจะใช้มีดังนี้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81mlMbMKDSnY5s9dh68Z-w.gif" /><figcaption>Install create-react-native-app</figcaption></figure><p>เริ่มต้นให้เราทำการติดตั้ง create-react-native-app ก่อนดังตัวอย่างครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kH2NvpJi1Z93HhGxuvAoEQ.gif" /><figcaption>Create React Native Application</figcaption></figure><p>หลังจากติดตั้ง create-react-native-app เสร็จเรียบร้อยเราก็จะสร้างโปรเจคของเราด้วยคำสั่ง create-react-native-app ตามด้วยชื่อโปรเจคของเราครับ</p><p>เมื่อสร้างโปรเจคเสร็จแล้ว เราจะลองรันด้วยคำสั่ง yarn start</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*IcQDh8FAVsX4Q663vWBfaw.gif" /><figcaption>Test Application on Expo Client iOS</figcaption></figure><p>ในภาพนี้เราจะทดสอบ Application ของเราผ่าน Expo Client บน iOS กัน</p><p>โดย ผมรับลิงค์ที่จะใช้เทสบน iOS ผ่านอีเมล</p><p>เมื่อคลิ้กที่ลิงค์ก็จะ ไปเปิดโปรแกรม Expo และ เปิดโปรเจคของเราขึ้นมาแสดงผล</p><p>จะเห็นว่าตัว Expo Client นั้นมี Inspector ช่วยให้เราสามารถ Debug Element ต่างๆได้ง่ายยิ่งขึ้นครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTi-cFQIoPQyoazclylOZA.gif" /><figcaption>Preview in iOS Simulator</figcaption></figure><p>ตัวอย่างนี้ เพียงกดตัวอักษร i ใน Command Line ก็จะเรียก iOS Simulator ขึ้นมาแสดงผลครับ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e9c4627d7f2ab1eecbfe2b48d047cdb/href">https://medium.com/media/8e9c4627d7f2ab1eecbfe2b48d047cdb/href</a></iframe><p>ตัวอย่าง source code เริ่มต้นที่ได้มาจะมีการใช้ View และ Text ซึ่งเป็น Component ที่มากับ react-native เราจะได้นำไปใช้งานกันเป็นประจำเลยครับ</p><p>ในบทนี้เราได้เรียนรู้อะไรบ้าง<br>- ติดตั้ง create-react-native-app บนเครื่องของเราได้<br>- สร้างโปรเจค react-native ได้<br>- เทสบน Expo Client และ iOS Simulator</p><p>ในบทถัดไป เราจะมา Overview Basic Components ต่างๆกันครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d028f583413d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/medvine/react-native-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99-d028f583413d">React Native ฉบับเริ่มต้น</a> was originally published in <a href="https://medium.com/medvine">Medvine Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>