<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TK</title>
    <description>The latest articles on DEV Community by TK (@takashi-kisaku).</description>
    <link>https://dev.to/takashi-kisaku</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F847803%2F32098b5c-c165-480d-a55d-72dacd74042b.jpeg</url>
      <title>DEV Community: TK</title>
      <link>https://dev.to/takashi-kisaku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/takashi-kisaku"/>
    <language>en</language>
    <item>
      <title>Voice Input Killed My Keyboard Hobby</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sun, 30 Nov 2025 09:24:08 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/i-built-keyboards-broke-wallets-learned-weird-layouts-and-then-voice-input-killed-the-hobby-3i5i</link>
      <guid>https://dev.to/takashi-kisaku/i-built-keyboards-broke-wallets-learned-weird-layouts-and-then-voice-input-killed-the-hobby-3i5i</guid>
      <description></description>
    </item>
    <item>
      <title>Tailwindcss intellisense doesn't work in tsx file.</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Mon, 08 Aug 2022 00:07:31 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/tailwindcss-intellisense-doesnt-work-in-tsx-file-4023</link>
      <guid>https://dev.to/takashi-kisaku/tailwindcss-intellisense-doesnt-work-in-tsx-file-4023</guid>
      <description>&lt;p&gt;I usuary use tailwind css with vscode. But one day, Tailwindcss intellisense doesn't work in tsx file. I configured some settings like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// It didn't work.
    "editor.quickSuggestions": {
        "strings": true
    },
    "tailwindCSS.emmetCompletions": true,
    "tailwindCSS.experimental.classRegex": [
        "className=\"([^`]*)" // className="From here
    ],
    "tailwindCSS.includeLanguages": {
        "javascript": "javascript",
        "html": "HTML"
    },

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My solution was to delete tailwind.config.js and configure it again!!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>tailwindcss</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Firestore error: Error: Value for argument "data" is not a valid Firestore document. Input is not a plain JavaScript object.</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sat, 06 Aug 2022 06:52:00 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/firestore-error-error-value-for-argument-data-is-not-a-valid-firestore-document-input-is-not-a-plain-javascript-object-5458</link>
      <guid>https://dev.to/takashi-kisaku/firestore-error-error-value-for-argument-data-is-not-a-valid-firestore-document-input-is-not-a-plain-javascript-object-5458</guid>
      <description>&lt;p&gt;Hello!!&lt;br&gt;
I'm trying to use firestore as database of my service api. But it was occured error like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Value for argument "data" is not a valid Firestore document. Input is not a plain JavaScript object.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Approach&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DocumentData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;FirestoreDataConverter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;QueryDocumentSnapshot&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@google-cloud/firestore&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;converter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
    &lt;span class="nx"&gt;AppValue&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AppValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;AppValue&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;FirestoreDataConverter&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AppValue&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;fromFirestore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;snapshot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;QueryDocumentSnapshot&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AppValue&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;snapshot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// @ts-ignore&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;toDate&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="c1"&gt;// Timestamp型は扱いにくいのでDate型に強制変更&lt;/span&gt;
                    &lt;span class="c1"&gt;// @ts-ignore&lt;/span&gt;
                    &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;toDate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="cm"&gt;/*
        * Async Await syntax don't support!!
        *
        * Fix like below
        * toFirestore: (value: AppValue): DocumentData =&amp;gt; {
        **/&lt;/span&gt;
        &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="na"&gt;toFirestore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AppValue&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;DocumentData&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;converter&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>firebase</category>
      <category>node</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Validator in js</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sat, 30 Jul 2022 04:58:00 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/validator-in-js-4amj</link>
      <guid>https://dev.to/takashi-kisaku/validator-in-js-4amj</guid>
      <description>&lt;p&gt;Hello world!!&lt;br&gt;
I'm searching about validator in js and ts. So, I'm gonna write about my summary and conclution.!!&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://npmtrends.com/ajv-vs-joi-vs-yup-vs-zod"&gt;Trends&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Merit&lt;/th&gt;
&lt;th&gt;Demerit&lt;/th&gt;
&lt;th&gt;Link&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Zod&lt;/td&gt;
&lt;td&gt;TypeScript-first schema validation with static type inference&lt;/td&gt;
&lt;td&gt;Method chaining and easy to get ts type&lt;/td&gt;
&lt;td&gt;Newer package&lt;/td&gt;
&lt;td&gt;&lt;a href="https://zod.dev"&gt;zod.dev&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;joi&lt;/td&gt;
&lt;td&gt;This is almost same to zod&lt;/td&gt;
&lt;td&gt;Have many plugins&lt;/td&gt;
&lt;td&gt;Doesn't support static type inference&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/sideway/joi"&gt;https://github.com/sideway/joi&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yup&lt;/td&gt;
&lt;td&gt;This is almost same to zod&lt;/td&gt;
&lt;td&gt;Have many plugins&lt;/td&gt;
&lt;td&gt;Missing some feature, function, deep object, promise... ...&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/jquense/yup"&gt;https://github.com/jquense/yup&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;class-validator&lt;/td&gt;
&lt;td&gt;Validate class properties&lt;/td&gt;
&lt;td&gt;Have many features&lt;/td&gt;
&lt;td&gt;Code isn't clean&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/typestack/class-validator"&gt;https://github.com/typestack/class-validator&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ajv&lt;/td&gt;
&lt;td&gt;Validate by json scheme&lt;/td&gt;
&lt;td&gt;Enable to share schem to other languages&lt;/td&gt;
&lt;td&gt;Not supported typescript&lt;/td&gt;
&lt;td&gt;&lt;a href="https://ajv.js.org/"&gt;https://ajv.js.org/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Recommandation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  If you don't validate by class
&lt;/h3&gt;

&lt;p&gt;I recommand you zod.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you want to use decorator for validation
&lt;/h3&gt;

&lt;p&gt;I don't recommand you class-validator, instead of it, I recommand you some plugins.&lt;/p&gt;

&lt;p&gt;For example, &lt;a href="https://github.com/joiful-ts/joiful"&gt;joiful&lt;/a&gt;. This is joi plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  zod
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// In typescript
import { z } from 'zod'

const userScheme = z.object({
    username: z.string(),
    email: z.string().email()
})
type User = z.infer&amp;lt;typeof userScheme&amp;gt;

const data: User = {
    username: 'Takashi',
    email: 'not email'
}

// This code will throw validation error!!
const validated = userScheme.parse(data)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>NextAuth: Custom user data</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sat, 23 Jul 2022 07:31:06 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/nextauth-custom-user-data-4501</link>
      <guid>https://dev.to/takashi-kisaku/nextauth-custom-user-data-4501</guid>
      <description>&lt;p&gt;I want to use custom user data but, I faced a trap. So I want to show you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default NextAuth({
  providers: [
    // ...some probiders
  ],
  callbacks: {
    async signIn({ user, account, profile, email, credentials }){
      // You cannot use spread syntax
      // user = {...[Your variable]}
      user.[Your variable] = {
        // ...some properties
      }
    },
    async jwt({ token, user }){
      // You cannot use spread syntax
      // token = {...user.[Your variable]}
      token.[Your variable] = user.[Your variable]
    },
    async session({ session, token }){
      // You cannot use spread syntax
      // session = {...token.[Your variable]}
      session.[Your variable] = token.[Your variable]
    }
  }
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Firestore data modeling best practice</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Mon, 18 Jul 2022 01:20:20 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/firestore-data-modeling-best-practice-cpk</link>
      <guid>https://dev.to/takashi-kisaku/firestore-data-modeling-best-practice-cpk</guid>
      <description>&lt;h1&gt;
  
  
  This articles is progress to write
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Query feature
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://chaim-zalmy-muskal.medium.com/firebase-subcollections-eb376f109c4a"&gt;Subcollectoin&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;If we use it, we cannot delete when delete root document.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Query subcollection directly

&lt;ul&gt;
&lt;li&gt;If you want to query subcollection directly you can use &lt;a href="https://firebase.google.com/docs/firestore/query-data/queries#collection-group-query"&gt;Collection group queries&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/56851908/is-collection-query-single-faster-than-a-groupcollection-query"&gt;Subcollection query is as fast as root collection query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Can have 2000 fields in a document.&lt;/p&gt;

&lt;h2&gt;
  
  
  Articles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/firestore/data-model"&gt;Oficial best practice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://proandroiddev.com/working-with-firestore-building-a-simple-database-model-79a5ce2692cb"&gt;Working with Firestore: Building a simple database model&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Videos
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/playlist?list=PLl-K7zZEsYLluG5MCVEzXAQ7ACZBCuZgZ"&gt;Get to know Cloud Firestore | Youtube play list&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>firebase</category>
      <category>firestore</category>
    </item>
    <item>
      <title>How to use decorator in typescript</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sun, 17 Jul 2022 11:49:48 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/how-to-use-decorator-in-typescript-26d</link>
      <guid>https://dev.to/takashi-kisaku/how-to-use-decorator-in-typescript-26d</guid>
      <description>&lt;p&gt;If you want to use decorator in typescript, I recommand you below tsconfig.json settings/&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "compilerOptions": {
        // Decorator settings
        "experimentalDecorators": true,
        "strictPropertyInitialization": false
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>sk-auth redirect https... ...</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sun, 17 Jul 2022 02:25:24 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/sk-auth-redirect-https--2k01</link>
      <guid>https://dev.to/takashi-kisaku/sk-auth-redirect-https--2k01</guid>
      <description>&lt;p&gt;I tried to develop authrization with Google Oauth via &lt;a href="https://github.com/Dan6erbond/sk-auth"&gt;sk-auth&lt;/a&gt;. sk-auth is library of SvelteKit like NextAuth.&lt;/p&gt;

&lt;p&gt;If we wanna change redirect url from https to http, we can use below code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const appAuth = new SvelteKitAuth({
    // We can change that by protocol property.
    protocol: 'http',
    jwtSecret: import.meta.env.VITE_JWT_SECRET,
    providers: [
        new Providers.GoogleOAuth2Provider({
            clientId: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_ID,
            clientSecret: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_SECRET,
            profile(profile) {
                return { ...profile, provider: 'google' };
            },
        })
    ],
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>svelte</category>
      <category>webdev</category>
      <category>oauth</category>
      <category>google</category>
    </item>
    <item>
      <title>Firebase: How to use emulator with express.js</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sat, 16 Jul 2022 07:41:21 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/firebase-how-to-use-emulator-with-expressjs-2551</link>
      <guid>https://dev.to/takashi-kisaku/firebase-how-to-use-emulator-with-expressjs-2551</guid>
      <description>&lt;p&gt;If you use &lt;code&gt;@google-cloud/firestore&lt;/code&gt; as firestore client and you want to use emulator, you can connect by below code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// In console

npx firebase emulators:start --project local-project-id

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// In app.ts
import {Firestore} from '@google-cloud/firestore'

const firestore = new Firestore({
  // Firestore emulator host
  host: 'localhost:4100',
  projectId: 'local-project-id',
  ssl: false,
  eexperimentalForceLongPolling: true
})

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Have a good day!!&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>node</category>
    </item>
    <item>
      <title>Firebase emulatos: UI doesn't work!!</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Sat, 16 Jul 2022 06:11:51 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/firebase-emulatos-ui-doesnt-work-19pp</link>
      <guid>https://dev.to/takashi-kisaku/firebase-emulatos-ui-doesnt-work-19pp</guid>
      <description>&lt;p&gt;Hellow!!&lt;br&gt;
I'm trying to develop REST API with CloudRun and Firestore, and I need to firestore emulator. So I was trying to use firebase-tools. But It occurs error like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This is firebase-debug.log

u [FetchError]: request to http://localhost:4400/emulators failed, reason: connect ECONNREFUSED ::1:4400
    at ClientRequest.&amp;lt;anonymous&amp;gt; (/Users/thikashi/.cache/firebase/emulators/ui-v1.7.0/server.bundle.js:326:16909)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketErrorListener (node:_http_client:481:9)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This is console

Emulator UI has exited upon receiving signal: SIGINT

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my case, I was using node.js ver 18, and I have changed to ver.16. It works well!!&lt;/p&gt;

&lt;p&gt;The problems took 3 hours... ... OMG.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>node</category>
    </item>
    <item>
      <title>How to reload express.js server with esbuild</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Fri, 15 Jul 2022 02:08:48 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/how-to-reload-expressjs-server-with-esbuild-2oo6</link>
      <guid>https://dev.to/takashi-kisaku/how-to-reload-expressjs-server-with-esbuild-2oo6</guid>
      <description>&lt;p&gt;Hello!!&lt;br&gt;
I'm trying to develop web server made of express.js. And I want to use esbuild as bundler, but esbuild don't have feature to realod server. So I tried to add the feature.&lt;/p&gt;

&lt;p&gt;Finally, I used nodemon. Like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "watch": [
        "src"
    ],
    "ignore": [
        "dist",
        "node_modules"
    ],
    "ext": "ts,mjs,js,json,graphql",
    "exec": "yarn build &amp;amp;&amp;amp; yarn start",
    "legacyWatch": true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But it isn't best way to reload because that code regenerate all code... ... If you have another solution, I want to know that!!&lt;/p&gt;

</description>
      <category>esbuild</category>
      <category>expressj</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is unsubscribe in Sveletekit?</title>
      <dc:creator>TK</dc:creator>
      <pubDate>Wed, 13 Jul 2022 05:48:49 +0000</pubDate>
      <link>https://dev.to/takashi-kisaku/what-is-unsubscribe-in-sveletekit-4jac</link>
      <guid>https://dev.to/takashi-kisaku/what-is-unsubscribe-in-sveletekit-4jac</guid>
      <description>&lt;p&gt;When I tried to create persited store in SvelteKit, I had to understand unscribe function like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
    import { onDestroy } from 'svelte'
    import { writable } from 'svelte/store';

    const count = writable(0, () =&amp;gt; {
        console.log('Start subscribing')
                // Below function is called when execute unsubscribe function.
        return () =&amp;gt; console.log('Stop subscribing');
    })

    const increment = () =&amp;gt; count.update(value =&amp;gt; {
        return value + 1
    })

    const unsubscribe = count.subscribe(value =&amp;gt; {
        console.log(value)
    })

        onDestroy(unsubscribe)
&amp;lt;/script&amp;gt;

&amp;lt;button on:click={increment}&amp;gt;
    Increment
&amp;lt;/button&amp;gt;
&amp;lt;button on:click={unsubscribe}&amp;gt;
    Stop subscribe
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is unsubscribe function?
&lt;/h2&gt;

&lt;p&gt;If we use subscribe, we should stop the subscribing. Because when component is died, we cannot stop it and use lots of memory. So we should call unsubscribe function with &lt;code&gt;onDestory&lt;/code&gt; function. But it is too trouble to develop... ... so we can use &lt;code&gt;$&lt;/code&gt; prefix as instead.&lt;/p&gt;

</description>
      <category>svelte</category>
      <category>sveltekit</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
