<?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 Ganes DS on Medium]]></title>
        <description><![CDATA[Stories by Ganes DS on Medium]]></description>
        <link>https://medium.com/@ganesya?source=rss-516f96de3787------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Ganes DS on Medium</title>
            <link>https://medium.com/@ganesya?source=rss-516f96de3787------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:12:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ganesya/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[Deploy Nuxt 3 on Ubuntu 22.04 with Cyberpanel]]></title>
            <link>https://ganesya.medium.com/deploy-nuxt-3-on-ubuntu-22-04-with-cyberpanel-420470d2ee5a?source=rss-516f96de3787------2</link>
            <guid isPermaLink="false">https://medium.com/p/420470d2ee5a</guid>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[cyberpanel]]></category>
            <category><![CDATA[litespeed]]></category>
            <category><![CDATA[nuxt-3]]></category>
            <dc:creator><![CDATA[Ganes DS]]></dc:creator>
            <pubDate>Wed, 31 May 2023 06:33:41 GMT</pubDate>
            <atom:updated>2023-05-31T06:36:12.903Z</atom:updated>
            <content:encoded><![CDATA[<p>This is tutorial to deploy Nuxt 3 app on Cyberpanel including OpenLiteSpeed configuration. More or less the step is same like my other article <a href="https://medium.com/@ganesya/sveltekit-on-vps-ubuntu-22-04-cyberpanel-and-litespeed-a3fe5b1ab37c">Deploy Sveltekit</a>.</p><h3>1. Make A Website</h3><p>Go to Cyberpanel, click on navigation Websites -&gt; Create website. For a demo, just use any domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgLEoz5I-yDyw04dQezAfA.png" /></figure><p>After finish created, it will show on Websites -&gt;List Websites, click on manage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FWux-yXgNpHilSql_nVFDg.png" /></figure><p>Click on preview, and <strong>remember the website base URL</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*p6KQnDD2gxZ1Z5BjezAtqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b0TwW-OGBWDjPjb9H2D3zQ.png" /></figure><p>Just leave it that way, lets move to next step.</p><h3>2. Nuxt 3 Local Source</h3><p>In local computer, try to create new Nuxt app, mine was Nuxt 3.5.2. For reference to get started: <a href="https://nuxt.com/">https://nuxt.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*FL5KMaFOpMPXCtAb2RG5Ww.png" /></figure><p>After install finish, enter npm run build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*YbJd8rB1zkzGtI4obnA_Iw.png" /></figure><p>After build finish, at default it will create .output folder and lets zip all files inside that folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/178/1*rRYp0Ebg1WXy1p_3IWYzOA.png" /><figcaption>Zip all files inside .output folder</figcaption></figure><h3>3. Upload, Extract and Install</h3><p>Go to File Manager website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*svGrCuQxl8odLVCKV7cVXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnNFBatms9QAaLccmq-L8g.png" /></figure><p>Browse to ‘public_html’, upload the ZIP file then extract it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCBwF5rXKDDAg60mK_F9Sw.png" /><figcaption>Ignore the default index.html of Cyberpanel</figcaption></figure><p>Back to local computer, open a command prompt, since I use Windows 10, it already include SSH.</p><p>Before go further make sure NodeJS is already installed on Ubuntu 22.04. This article can be used as reference: <a href="https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04">https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04</a>.</p><p>Login to your root via SSH, then go to home directory of website just-for-test.com and enter HOST=127.0.0.1 PORT=5005 node server/index.mjs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*3MthDuqploYnxWF6nRDxCw.png" /></figure><p>Keep the command prompt open.</p><h3>4. LiteSpeed WebAdmin Configuration</h3><p>This is for make server listen to Nuxt 3 running apps port. Lets login to OpenLiteSpeed webadmin.</p><p>Just in case, how to login to LiteSpeed panel, a reference: <a href="https://community.cyberpanel.net/t/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console/14052">https://community.cyberpanel.net/t/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console/14052</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*DGAZZTzR6DiLv2V92sJChA.png" /><figcaption>Login interface of OpenLiteSpeed WebAdmin</figcaption></figure><p>After login, go to Virtual Hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*DSlpVg89G6D_SqRdku90kw.png" /></figure><p>Open virtual host just-for-test.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ezwuCM-mk6WKPdDKlxFKQA.png" /></figure><p>Click ‘External App’ tab, on far right, click ‘+’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAc3GsY8yU3vb6rJO9-zvA.png" /></figure><p>Create External App, type Web Server, then click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLrGXgabEDo3aMTEP6Tbuw.png" /></figure><p>Fill every required input, <strong>the most important is ‘Address’, the value should be the same with Nuxt app that running </strong>on Ubuntu, thats where LiteSpeed listen to Nuxt 3 app. Don’t forget to save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tiVJePKSwpUcdK80vGryxQ.png" /></figure><p>External App just created, for now ignore the warning notification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*21PGJPvpikwlHMbGBwFOrw.png" /></figure><p>Go to Context, click ‘Context’ tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ltDrM0F7mC8gQfzllklXUg.png" /></figure><p>This process also known as proxy, its same like Apache / Nginx proxy. Create New Context type Proxy, then click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FxjvNdyDWjXeGSvEFfW9Nw.png" /></figure><p>Fill the required input, URI ‘/’ and choose Web Server that created before, then save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Y6sHS7G80v631WhnSG_6w.png" /></figure><p>See the Context List, it just make new type proxy. Click icon restart to see the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoSxFWCWZhLKxWplD8nlGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l2FQ9USf2EN2jthsvSC5OA.png" /></figure><p>Go to your site preview and Nuxt 3 app is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQZH8ARKmpeJ4Rty_KLfdw.png" /></figure><p>For make it work properly change the domain with real active domain. Perhaps this deployment process also can be used for Next JS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=420470d2ee5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Sveltekit on VPS Ubuntu 22.04 using Cyberpanel and LiteSpeed]]></title>
            <link>https://ganesya.medium.com/sveltekit-on-vps-ubuntu-22-04-cyberpanel-and-litespeed-a3fe5b1ab37c?source=rss-516f96de3787------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3fe5b1ab37c</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[cyberpanel]]></category>
            <category><![CDATA[sveltekit]]></category>
            <category><![CDATA[litespeed]]></category>
            <dc:creator><![CDATA[Ganes DS]]></dc:creator>
            <pubDate>Tue, 30 May 2023 18:55:30 GMT</pubDate>
            <atom:updated>2023-05-31T06:35:17.893Z</atom:updated>
            <content:encoded><![CDATA[<p>Deploy Sveltekit apps on Cyberpanel is not an average daily activity, just try searching with keyword on search engine “sveltekit cyberpanel”, less than 10k result and thats make deploying sveltekit apps seems more challenging.</p><p>Before move to first step, make sure that<strong> Cyberpanel is already installed</strong> and running on VPS, no need for domain, public IP is suffice, e.g. <a href="http://12.34.56.78:8090.">http://12.34.56.78:8090.</a> Theres many things to cover for configuration etc but I just make it to the point, make sveltekit apps running on Cyberpanel.</p><p>Tl;dr</p><h3>1. Make A Website</h3><p>Go to Cyberpanel, click on navigation Websites -&gt; Create website. For a demo, random domain is enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgLEoz5I-yDyw04dQezAfA.png" /></figure><p>After finish created, it will show on Websites -&gt;List Websites, click on manage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FWux-yXgNpHilSql_nVFDg.png" /></figure><p>Click on preview, and <strong>remember the website base URL</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*p6KQnDD2gxZ1Z5BjezAtqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b0TwW-OGBWDjPjb9H2D3zQ.png" /></figure><p>Lets just leave it that way, for a while.</p><h3><strong>2. Sveltekit Local Source</strong></h3><p>In local computer, try to create new Sveltekit app, a Sveltekit demo app seems a proper way. For reference: <a href="https://kit.svelte.dev/docs/creating-a-project">https://kit.svelte.dev/docs/creating-a-project</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*2RdDxwM_lidiT24EOLXdRA.png" /></figure><p>Before deploying the SvelteKit app, you need to <em>adapt</em> it for your deployment target. Adapters are small plugins that take the built app as input and generate output for deployment. Read more here: <a href="https://kit.svelte.dev/docs/adapters">https://kit.svelte.dev/docs/adapters</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*RooDnc-eExiTBGNn5r1tng.png" /></figure><p>In this case, Node is the chosen one. So, do a little favor with Sveltekit build adapter. Start with npm install and install node adapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*iqafpe2Fbk4RNoVk2Z25LA.png" /></figure><p>Change one line of code on svelte.config.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*LSx4AR03A2wUj5JQPy-CdQ.png" /></figure><p>Then ZIP sources, <strong>except node_modules, </strong>this inside of zip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*Mr_2DefDreu644deCbLosw.png" /></figure><h3>3. Upload, Extract and Install</h3><p>Go to File Manager website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*svGrCuQxl8odLVCKV7cVXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnNFBatms9QAaLccmq-L8g.png" /></figure><p>Browse to ‘public_html’, upload the ZIP file then extract it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*wgBAtzD9xFJNcnZ2YeawHw.png" /></figure><p>Back to local computer, open a command prompt, since I use Windows 10, it already include SSH.</p><p>Before install node_modules with npm, make sure NodeJS is already installed on VPS Ubuntu 22.04. This article can be used as reference: <a href="https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04">https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04</a></p><p>Login to your root via SSH, then go to home directory of website just-for-test.com and enter npm install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*QHbsfAK64lY56XXNktV23g.png" /></figure><p>Enternpm run build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPx1QpwsJGBjYNHGhI004A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*HPFbhtlngDo890A--S6EBQ.png" /></figure><p>Enter HOST=127.0.0.1 PORT=4000 node build. Sveltekit demo apps should be running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*-GY7Vqx8UEE-TShAtUYloA.png" /></figure><p>Leave the command prompt open.</p><h3>4. LiteSpeed WebAdmin Configuration</h3><p>This is for make server listen to Sveltekit running apps port. Lets login to OpenLiteSpeed webadmin.</p><p>Just in case, how to login to LiteSpeed panel, a reference: <a href="https://community.cyberpanel.net/t/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console/14052">https://community.cyberpanel.net/t/tutorial-how-to-setup-and-login-to-openlitespeed-webadmin-console/14052</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*DGAZZTzR6DiLv2V92sJChA.png" /><figcaption>Login interface of OpenLiteSpeed WebAdmin</figcaption></figure><p>After login, go to Virtual Hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*DSlpVg89G6D_SqRdku90kw.png" /></figure><p>Open virtual host just-for-test.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ezwuCM-mk6WKPdDKlxFKQA.png" /></figure><p>Click ‘External App’ tab, on far right, click ‘+’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAc3GsY8yU3vb6rJO9-zvA.png" /></figure><p>Create External App, type Web Server, then click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLrGXgabEDo3aMTEP6Tbuw.png" /></figure><p>Fill every required input, <strong>the most important is ‘Address’, the value should be the same with Sveltekit app that running on SSH</strong>, thats where LiteSpeed listen to Sveltekit app. Don’t forget to save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EwwVkB-65Z7ICLj3kL7y-w.png" /></figure><p>External App just created, for now ignore the warning notification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIcGE7dZA-rkW7ZdgoPgcg.png" /></figure><p>Go to Context, click ‘Context’ tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ltDrM0F7mC8gQfzllklXUg.png" /></figure><p>This process also known as proxy, its same like Apache / Nginx proxy. Create New Context type Proxy, then click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FxjvNdyDWjXeGSvEFfW9Nw.png" /></figure><p>Fill the required input, URI ‘/’ and choose Web Server that created before, then save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Y6sHS7G80v631WhnSG_6w.png" /></figure><p>See the Context List, it just make new type proxy. Click icon restart to see the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoSxFWCWZhLKxWplD8nlGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l2FQ9USf2EN2jthsvSC5OA.png" /></figure><p>Go to your site preview and Sveltekit demo app is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*bvSrKmJ9fGun1h9-Ich2Vw.png" /></figure><p>Since this is just preview with dummy domain, routes not behaves just like it should be. The solution is make new website and replace just-for-test.com with real active domain. That’s it! Hope this demo tutorial will helpful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3fe5b1ab37c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Setup Inertia JS with Laravel 8 And Vue 3]]></title>
            <link>https://ganesya.medium.com/basic-setup-inertia-js-with-laravel-8-and-vue-3-c59cefce0b3e?source=rss-516f96de3787------2</link>
            <guid isPermaLink="false">https://medium.com/p/c59cefce0b3e</guid>
            <category><![CDATA[laravel8]]></category>
            <category><![CDATA[vue-3]]></category>
            <category><![CDATA[inertia-js]]></category>
            <dc:creator><![CDATA[Ganes DS]]></dc:creator>
            <pubDate>Sat, 31 Oct 2020 09:13:25 GMT</pubDate>
            <atom:updated>2021-02-03T14:21:00.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*JfuLCpKnXPZ1qwwtwFyRIQ.gif" /></figure><p>Its my experience when try build a little project with Inertia JS. Just like the title, it combine Inertia JS as glue for Laravel 8 as server-side and Vue 3 as client-side. So I take that anyone who read this already know how to deploy Laravel 8 with ‘artisan’ and combine it with Vue with ‘npm’.</p><p><strong>Laravel Mix 6 &amp; Vue 3</strong></p><p>Start with command ‘npm install’ then update laravel-mix and add Vue 3.</p><pre>npm install</pre><p>Make sure it finish with 0 vulnerabilities , check package.json laravel-mix still in version 5, we need laravel-mix version 6.</p><pre>npm install laravel-mix@next</pre><p>Make sure it finish with 0 vulnerabilities. Then you need to do changes of code, check laravel-mix github, <a href="https://github.com/JeffreyWay/laravel-mix/blob/master/UPGRADE.md"><strong>link here</strong></a>.</p><p>Pay attention on these section, ‘Update Your NPM Scripts’, ‘API for JavaScript Frameworks’, ‘Vue Configuration’. For npm scripts personally I won’t delete ‘dev’ line.</p><pre>npm install vue@next</pre><p>It will add Vue 3, then check package.json, dependencies of it has to be there, be sure check documentation from Vue official website.</p><p><strong>Inertia JS Setup</strong></p><p>Its more or less same like documentation of <a href="https://inertiajs.com/">Inertia JS</a>. Start with server-side setup then client-side setup.</p><pre>composer require inertiajs/inertia-laravel</pre><p>Install the adapter of Inertia JS for Laravel. Check the server setup <a href="https://inertiajs.com/server-side-setup"><strong>here</strong></a>.</p><pre>resources/view/app.blade.php</pre><p>Create app.blade.php and just copy and paste template from <a href="https://inertiajs.com/server-side-setup"><strong>here</strong></a>.</p><pre>php artisan inertia:middleware</pre><p>Run artisan for create Inertia JS Middleware.</p><pre>protected $middlewareGroups = [<br>&#39;web&#39; =&gt; [ ...<br><strong>\App\Http\Middleware\HandleInertiaRequests::class</strong> ]<br>...</pre><p>Register HandleInertiaRequests::class in Kernel.php on web middleware group.</p><pre>npm install @inertiajs/inertia @inertiajs/inertia-vue @inertiajs/inertia-vue3</pre><p>Install Inertia JS adapter for Vue. Notice the additional inertia-vue3.</p><p>Add lines of code initialization of Vue 3 app on app.js , just copy and paste from <a href="https://inertiajs.com/client-side-setup">https://inertiajs.com/client-side-setup</a>.</p><pre>npm install @inertiajs/progress</pre><p>Intall Inertia JS progress, then add lines of code, it also on <a href="https://inertiajs.com/client-side-setup">https://inertiajs.com/client-side-setup</a>.</p><p>Inertia minimum setup done, there is some cache setup but it can do later.</p><p><strong>The rest was just Laravel routines step</strong></p><p>Create folder and vue file, ‘resources/js/Pages/Home/Index.vue’ , just make simple code with :</p><pre>&lt;template&gt;<br>   &lt;div&gt;<br>      &lt;h1&gt;Hello World&lt;/h1&gt;<br>   &lt;/div&gt;<br>&lt;/template&gt;</pre><pre>php artisan make:controller HomeController</pre><p>Create ‘HomeController’ with artisan, add line of code like this:</p><pre>&lt;?php</pre><pre>namespace App\Http\Controllers;</pre><pre>use Illuminate\Http\Request;<br>use Inertia\Inertia; // use Inertia class</pre><pre>class HomeController extends Controller{</pre><pre>     public function index(){<br>     <br>          return Inertia::render(&#39;Home/Index&#39;);</pre><pre>     }</pre><pre>}</pre><p>Next, modified ‘routes/web.php’, change the code :</p><pre>&lt;?php</pre><pre>use Illuminate\Support\Facades\Route;<br>use App\Http\Controllers\HomeController;</pre><pre>Route::get(&#39;/&#39;, [HomeController::class, &#39;index&#39;])-&gt;name(&#39;home&#39;);</pre><p>Go to console command and do ‘npm run dev’, if message appear like this ‘Additional dependencies must be installed. This will only take a moment.’, ‘npm run dev’ again until ‘DONE Compiled successfully’.</p><p>Start the server with command ‘php artisan serve’ , check your development server and ‘Hello world!’ show.</p><p><strong>Testing Inertia JS</strong></p><p>The ‘Hello World!’ is the prove that the setup is success but I guess its not do the justice. You might want to know if Inertia JS feature is running and working. Let’s make simple link between pages.</p><ol><li>Add lines of code on existing ‘HomeController.php’.</li></ol><pre>public function about(){ return Inertia::render(‘About/Index’); }</pre><p>2. Create new folder and vue file ‘resources/js/Pages/About/Index.vue’. Add lines of code.</p><pre>&lt;template&gt;<br>     &lt;div&gt;<br>        &lt;inertia-link href=”/”&gt;Home&lt;/inertia-link&gt;<br>        &lt;h1&gt;About Us&lt;/h1&gt;<br>     &lt;/div&gt;<br>&lt;/template&gt;</pre><p>Notice that we add new element there &lt;inertia-link&gt;.</p><p>3. Add lines of code on ‘routes/web.php’.</p><pre>Route::get(‘/about’, [HomeController::class, ‘about’])<br>-&gt;name(‘about’);</pre><p>4. Modified existing vue file on ‘resources/js/Pages/Home/Index.vue’. Add new element &lt;inertia-link&gt;.</p><pre>&lt;template&gt;<br>   &lt;div&gt;<br>       &lt;inertia-link href=”/about”&gt;About&lt;/inertia-link&gt;    <br>       &lt;h1&gt;Hello World&lt;/h1&gt;<br>   &lt;/div&gt;<br>&lt;/template&gt;</pre><p>5. Do ‘npm run dev’ and run your server ‘php artisan serve’.</p><p>Let’s see the result, your page will behave like how SPA did.</p><p>And yes, I just do the fastest way with that ‘href’ and you might want to check how to do proper ways to link using route from Inertia JS documentation.</p><p>Well, that’s the basic setup to combine Inertia JS with Laravel 8 as server-side and Vue 3 as client-side. Hope it helps.</p><p><strong>Github sources</strong></p><p>You can download the sources in <a href="https://github.com/polaweb/laravel8-inertiajs-vue3-boilerplate">https://github.com/polaweb/laravel8-inertiajs-vue3-boilerplate</a>.</p><p>After you extract the zip / clone on your local folder, you need to run ‘npm install’, then run the Laravel with ‘php artisan serve’.</p><p><strong>Updated</strong></p><p>I add Ziggy, its Laravel package for javascript route that works on blade template. I also change lines of code on app.js, add some option on webpack.mix.js and add little Vue 3 layout.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c59cefce0b3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>