[{"data":1,"prerenderedAt":1430},["ShallowReactive",2],{"recent-post":3,"trending-post":1100},[4,518,955],{"id":5,"title":6,"body":7,"description":505,"extension":506,"meta":507,"navigation":139,"ogImage":509,"path":514,"seo":515,"stem":516,"__hash__":517},"content/blogs/8. float-make-my-dollar-float-away.md","FLOAT Made My Dollars Float Away - FLOAT vs DECIMAL in MySQL 💸",{"type":8,"value":9,"toc":494},"minimark",[10,15,33,44,51,58,62,71,78,92,95,99,158,161,197,207,211,214,229,232,260,263,278,284,291,295,301,318,359,361,385,388,392,395,404,407,419,422,426,434,438,470,474,484,490],[11,12,14],"h3",{"id":13},"recently-i-got-a-task","Recently I got a task:",[16,17,18],"blockquote",{},[19,20,21],"p",{},[22,23,24,25,29,30],"strong",{},"Alter a table column from ",[26,27,28],"code",{},"FLOAT"," to ",[26,31,32],{},"DECIMAL(10,2)",[19,34,35,36],{},"I thought:\n",[37,38,39,40,43],"em",{},"\"Pff, easy task. Just run an ",[26,41,42],{},"ALTER TABLE"," and done. Why is this even a ticket?\"",[19,45,46,47,50],{},"But then I read the description.\nTurns out, ",[22,48,49],{},"FLOAT was causing data loss",", and I needed to convert it without losing data.",[19,52,53,54,57],{},"That’s when I realized: this isn’t just about one query. It’s about how ",[22,55,56],{},"FLOAT silently eats your money"," in MySQL.",[11,59,61],{"id":60},"why-float-is-a-problem","Why FLOAT is a Problem",[19,63,64,66,67,70],{},[26,65,28],{}," in MySQL is a ",[22,68,69],{},"binary floating-point type",".\nIt doesn’t store exact values — only approximations.",[19,72,73,74,77],{},"That’s fine for rocket science 🚀 or graphics rendering 🎮, but for ",[22,75,76],{},"money"," where every cent matters? Disaster.",[19,79,80,81,83,84,87,88,91],{},"Think of ",[26,82,28],{}," as a leaky bucket. You pour in ",[26,85,86],{},"$1,000,000.25","… and it gives you back ",[26,89,90],{},"$999,999.94",".",[19,93,94],{},"Not funny when it’s your salary.",[11,96,98],{"id":97},"example-of-data-loss","Example of Data Loss",[100,101,106],"pre",{"className":102,"code":103,"language":104,"meta":105,"style":105},"language-sql shiki shiki-themes dracula","CREATE TABLE money_float (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    amount FLOAT\n);\n\nINSERT INTO money_float (amount) VALUES (1000000.25), (123456789.99);\n\nSELECT * FROM money_float;\n","sql","",[26,107,108,116,122,128,134,141,147,152],{"__ignoreMap":105},[109,110,113],"span",{"class":111,"line":112},"line",1,[109,114,115],{},"CREATE TABLE money_float (\n",[109,117,119],{"class":111,"line":118},2,[109,120,121],{},"    id INT AUTO_INCREMENT PRIMARY KEY,\n",[109,123,125],{"class":111,"line":124},3,[109,126,127],{},"    amount FLOAT\n",[109,129,131],{"class":111,"line":130},4,[109,132,133],{},");\n",[109,135,137],{"class":111,"line":136},5,[109,138,140],{"emptyLinePlaceholder":139},true,"\n",[109,142,144],{"class":111,"line":143},6,[109,145,146],{},"INSERT INTO money_float (amount) VALUES (1000000.25), (123456789.99);\n",[109,148,150],{"class":111,"line":149},7,[109,151,140],{"emptyLinePlaceholder":139},[109,153,155],{"class":111,"line":154},8,[109,156,157],{},"SELECT * FROM money_float;\n",[19,159,160],{},"Result:",[162,163,164,177],"table",{},[165,166,167],"thead",{},[168,169,170,174],"tr",{},[171,172,173],"th",{},"id",[171,175,176],{},"amount",[178,179,180,189],"tbody",{},[168,181,182,186],{},[183,184,185],"td",{},"1",[183,187,188],{},"1000000.25",[168,190,191,194],{},[183,192,193],{},"2",[183,195,196],{},"123456792.00",[19,198,199,200,203,204,206],{},"We inserted ",[26,201,202],{},"123456789.99",", but got back ",[26,205,196],{},".\nThe bigger the number, the worse the corruption.",[11,208,210],{"id":209},"but-why-does-float-lose-data","But Why Does FLOAT Lose Data?",[19,212,213],{},"Here’s the fun part. Let’s make it simple.",[215,216,217,226],"ul",{},[218,219,220,222,223,91],"li",{},[26,221,28],{}," stores numbers in ",[22,224,225],{},"binary (base 2)",[218,227,228],{},"But not every decimal number can be written exactly in binary.",[19,230,231],{},"Example:",[215,233,234,241,254],{},[218,235,236,237,240],{},"In decimal, ",[26,238,239],{},"0.1"," is simple.",[218,242,243,244,246,247,250,251],{},"In binary, ",[26,245,239],{}," is ",[22,248,249],{},"infinite repeating",": ",[26,252,253],{},"0.0001100110011…",[218,255,256,257,259],{},"So ",[26,258,28],{}," cuts it off at some point and stores an approximation.",[19,261,262],{},"That’s why when you do:",[100,264,266],{"className":102,"code":265,"language":104,"meta":105,"style":105},"INSERT INTO money_float (amount) VALUES (0.1);\nSELECT amount FROM money_float;\n",[26,267,268,273],{"__ignoreMap":105},[109,269,270],{"class":111,"line":112},[109,271,272],{},"INSERT INTO money_float (amount) VALUES (0.1);\n",[109,274,275],{"class":111,"line":118},[109,276,277],{},"SELECT amount FROM money_float;\n",[19,279,280,281,91],{},"You might see something like ",[26,282,283],{},"0.10000000149",[19,285,286,287,290],{},"Now imagine this tiny error repeated in ",[22,288,289],{},"millions of dollars",".\nErrors pile up, and suddenly your 9-digit amount looks… off.",[11,292,294],{"id":293},"decimal-to-the-rescue","DECIMAL to the Rescue",[19,296,297,300],{},[26,298,299],{},"DECIMAL"," stores numbers differently:",[215,302,303,310],{},[218,304,305,306,309],{},"Instead of binary approximation, it stores ",[22,307,308],{},"exact digits as strings"," internally.",[218,311,312,313,315,316,91],{},"That means ",[26,314,202],{}," is stored as exactly ",[26,317,202],{},[100,319,321],{"className":102,"code":320,"language":104,"meta":105,"style":105},"CREATE TABLE money_decimal (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    amount DECIMAL(15,2)\n);\n\nINSERT INTO money_decimal (amount) VALUES (1000000.25), (123456789.99);\n\nSELECT * FROM money_decimal;\n",[26,322,323,328,332,337,341,345,350,354],{"__ignoreMap":105},[109,324,325],{"class":111,"line":112},[109,326,327],{},"CREATE TABLE money_decimal (\n",[109,329,330],{"class":111,"line":118},[109,331,121],{},[109,333,334],{"class":111,"line":124},[109,335,336],{},"    amount DECIMAL(15,2)\n",[109,338,339],{"class":111,"line":130},[109,340,133],{},[109,342,343],{"class":111,"line":136},[109,344,140],{"emptyLinePlaceholder":139},[109,346,347],{"class":111,"line":143},[109,348,349],{},"INSERT INTO money_decimal (amount) VALUES (1000000.25), (123456789.99);\n",[109,351,352],{"class":111,"line":149},[109,353,140],{"emptyLinePlaceholder":139},[109,355,356],{"class":111,"line":154},[109,357,358],{},"SELECT * FROM money_decimal;\n",[19,360,160],{},[162,362,363,371],{},[165,364,365],{},[168,366,367,369],{},[171,368,173],{},[171,370,176],{},[178,372,373,379],{},[168,374,375,377],{},[183,376,185],{},[183,378,188],{},[168,380,381,383],{},[183,382,193],{},[183,384,202],{},[19,386,387],{},"Perfect. ✅ No rounding surprises.",[11,389,391],{"id":390},"why-alter-wont-save-you","Why ALTER Won’t Save You",[19,393,394],{},"Here’s the trap I fell into:",[100,396,398],{"className":102,"code":397,"language":104,"meta":105,"style":105},"ALTER TABLE money_float MODIFY amount DECIMAL(15,2);\n",[26,399,400],{"__ignoreMap":105},[109,401,402],{"class":111,"line":112},[109,403,397],{},[19,405,406],{},"You’d think this fixes it, right?\nNope. ❌",[19,408,409,410,412,413,416,417,91],{},"The data was already corrupted when it was first inserted as ",[26,411,28],{},".\n",[26,414,415],{},"ALTER"," just moves the already-broken value into ",[26,418,299],{},[19,420,421],{},"Garbage in → garbage out.",[11,423,425],{"id":424},"visual-float-vs-decimal","Visual: FLOAT vs DECIMAL",[100,427,432],{"className":428,"code":430,"language":431},[429],"language-text","FLOAT (approximation in binary):\n123456789.99  --->  123456792.00 💀\n\nDECIMAL (exact digits):\n123456789.99  --->  123456789.99 ✅\n","text",[26,433,430],{"__ignoreMap":105},[11,435,437],{"id":436},"lessons-learned","Lessons Learned",[215,439,440,450,461],{},[218,441,442,443,445,446,449],{},"Never use ",[26,444,28],{},"/",[26,447,448],{},"DOUBLE"," for money.",[218,451,452,453,456,457,460],{},"Always use ",[26,454,455],{},"DECIMAL(precision, scale)"," (e.g., ",[26,458,459],{},"DECIMAL(15,2)",").",[218,462,463,464,466,467,469],{},"If your table already has money in ",[26,465,28],{},", you cannot fix the lost precision with ",[26,468,415],{},". You’ll need to re-import or clean it at the source.",[11,471,473],{"id":472},"final-thought","Final Thought",[19,475,476,477,479,480,483],{},"Using ",[26,478,28],{}," for money is like paying your salary in ",[22,481,482],{},"Monopoly money",". 🎲💵\nIt looks okay until you try to spend it — then you realize it’s worthless.",[19,485,486,487,489],{},"Stick with ",[26,488,299],{},", and your dollars will stay safe. ✅",[491,492,493],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":105,"searchDepth":118,"depth":118,"links":495},[496,497,498,499,500,501,502,503,504],{"id":13,"depth":124,"text":14},{"id":60,"depth":124,"text":61},{"id":97,"depth":124,"text":98},{"id":209,"depth":124,"text":210},{"id":293,"depth":124,"text":294},{"id":390,"depth":124,"text":391},{"id":424,"depth":124,"text":425},{"id":436,"depth":124,"text":437},{"id":472,"depth":124,"text":473},"Recently I got a task Alter a table column from `FLOAT` to `DECIMAL(10,2)","md",{"date":508,"image":509,"alt":6,"tags":510,"published":139},"19th Sep 2025","/blogs-img/blog8.png",[511,512,513],"mysql","float","decimal","/blogs/float-make-my-dollar-float-away",{"title":6,"description":505},"blogs/8. float-make-my-dollar-float-away","LLMtdDXEF2PNMbVJsdAFzOmMKY39dzRGJa9XONZHDaI",{"id":519,"title":520,"body":521,"description":944,"extension":506,"meta":945,"navigation":139,"ogImage":947,"path":951,"seo":952,"stem":953,"__hash__":954},"content/blogs/7. redis-ttl-jitter-and-how-i-almost-crashed-a-server.md","Redis TTL, Jitter, and How I Almost Crashed a Server 🚀",{"type":8,"value":522,"toc":935},[523,527,532,535,539,546,561,568,572,575,580,583,637,640,643,647,657,660,665,668,674,680,684,690,701,840,854,858,861,870,873,887,894,898,901,912,918,921,932],[11,524,526],{"id":525},"recently-i-ran-into-an-interesting-redis-case-that-taught-me-a-big-lesson","Recently, I ran into an interesting Redis case that taught me a big lesson:",[19,528,529],{},[22,530,531],{},"Infinite cache TTLs are like hoarding—things pile up until it’s a problem.",[533,534],"hr",{},[11,536,538],{"id":537},"the-setup-infinite-cache","The Setup: Infinite Cache",[19,540,541,542,545],{},"Once upon a time (okay, just a few months ago), we were saving some data in Redis with ",[22,543,544],{},"no expiration",". The idea was simple:",[215,547,548,555,558],{},[218,549,550,551,554],{},"Data comes from another system (the ",[37,552,553],{},"real"," source of truth).",[218,556,557],{},"We cache it in Redis for fast access.",[218,559,560],{},"Done. Easy. ✅",[19,562,563,564,567],{},"But here’s the problem: when you never expire cache, it ",[22,565,566],{},"keeps growing",". And growing. And growing. Like that drawer in your house where you throw every cable you’ve ever owned.",[11,569,571],{"id":570},"the-task-add-a-ttl","The Task: Add a TTL",[19,573,574],{},"One day, I got the task:",[16,576,577],{},[19,578,579],{},"“Please set a TTL of two weeks for this cache.”",[19,581,582],{},"Sounds easy, right? Just add:",[100,584,588],{"className":585,"code":586,"language":587,"meta":105,"style":105},"language-js shiki shiki-themes dracula","redis.set('mykey', value, 'EX', 1209600) // 2 weeks in seconds\n","js",[26,589,590],{"__ignoreMap":105},[109,591,592,596,600,603,607,611,613,616,618,621,623,626,630,633],{"class":111,"line":112},[109,593,595],{"class":594},"sCdxs","redis.",[109,597,599],{"class":598},"sAOxA","set",[109,601,602],{"class":594},"(",[109,604,606],{"class":605},"seVfx","'",[109,608,610],{"class":609},"s-mGx","mykey",[109,612,606],{"class":605},[109,614,615],{"class":594},", value, ",[109,617,606],{"class":605},[109,619,620],{"class":609},"EX",[109,622,606],{"class":605},[109,624,625],{"class":594},", ",[109,627,629],{"class":628},"sIQBb","1209600",[109,631,632],{"class":594},") ",[109,634,636],{"class":635},"shSDL","// 2 weeks in seconds\n",[19,638,639],{},"Boom. Done. Task finished. Go get coffee. ☕",[19,641,642],{},"Except… not really.",[11,644,646],{"id":645},"the-problem-cache-avalanche","The Problem: Cache Avalanche",[19,648,649,650,653,654,91],{},"Think about what happens ",[22,651,652],{},"two weeks later",".\nEvery single cached key expires ",[22,655,656],{},"at the same time",[19,658,659],{},"Suddenly, Redis says:",[16,661,662],{},[19,663,664],{},"“Sorry boss, no cache here!”",[19,666,667],{},"And then our poor backend server (the real source of truth) gets flooded with requests, like:",[100,669,672],{"className":670,"code":671,"language":431},[429],"HELP! SEND DATA! SEND DATA! SEND DATA!\n",[26,673,671],{"__ignoreMap":105},[19,675,676,677,91],{},"The server could literally crash under the unexpected load. This is called a ",[22,678,679],{},"cache avalanche",[11,681,683],{"id":682},"the-solution-add-jitter","The Solution: Add Jitter",[19,685,686,687],{},"The trick is simple but powerful: ",[22,688,689],{},"don’t let all keys expire at once.",[19,691,692,693,696,697,700],{},"Instead of setting ",[22,694,695],{},"exactly 2 weeks",", we add a little randomness (aka ",[37,698,699],{},"jitter","). For example:",[100,702,704],{"className":585,"code":703,"language":587,"meta":105,"style":105},"// Expire between 14 and 16 days\nconst baseTTL = 14 * 24 * 60 * 60 // 14 days\nconst jitter = Math.floor(Math.random() * (2 * 24 * 60 * 60)) // up to 2 days\nconst ttl = baseTTL + jitter\n\nredis.set('mykey', value, 'EX', ttl)\n",[26,705,706,711,744,794,811,815],{"__ignoreMap":105},[109,707,708],{"class":111,"line":112},[109,709,710],{"class":635},"// Expire between 14 and 16 days\n",[109,712,713,717,720,723,726,729,732,734,737,739,741],{"class":111,"line":118},[109,714,716],{"class":715},"s0Tla","const",[109,718,719],{"class":594}," baseTTL ",[109,721,722],{"class":715},"=",[109,724,725],{"class":628}," 14",[109,727,728],{"class":715}," *",[109,730,731],{"class":628}," 24",[109,733,728],{"class":715},[109,735,736],{"class":628}," 60",[109,738,728],{"class":715},[109,740,736],{"class":628},[109,742,743],{"class":635}," // 14 days\n",[109,745,746,748,751,753,756,759,762,765,768,771,774,776,778,780,782,784,786,788,791],{"class":111,"line":124},[109,747,716],{"class":715},[109,749,750],{"class":594}," jitter ",[109,752,722],{"class":715},[109,754,755],{"class":594}," Math.",[109,757,758],{"class":598},"floor",[109,760,761],{"class":594},"(Math.",[109,763,764],{"class":598},"random",[109,766,767],{"class":594},"() ",[109,769,770],{"class":715},"*",[109,772,773],{"class":594}," (",[109,775,193],{"class":628},[109,777,728],{"class":715},[109,779,731],{"class":628},[109,781,728],{"class":715},[109,783,736],{"class":628},[109,785,728],{"class":715},[109,787,736],{"class":628},[109,789,790],{"class":594},")) ",[109,792,793],{"class":635},"// up to 2 days\n",[109,795,796,798,801,803,805,808],{"class":111,"line":130},[109,797,716],{"class":715},[109,799,800],{"class":594}," ttl ",[109,802,722],{"class":715},[109,804,719],{"class":594},[109,806,807],{"class":715},"+",[109,809,810],{"class":594}," jitter\n",[109,812,813],{"class":111,"line":136},[109,814,140],{"emptyLinePlaceholder":139},[109,816,817,819,821,823,825,827,829,831,833,835,837],{"class":111,"line":143},[109,818,595],{"class":594},[109,820,599],{"class":598},[109,822,602],{"class":594},[109,824,606],{"class":605},[109,826,610],{"class":609},[109,828,606],{"class":605},[109,830,615],{"class":594},[109,832,606],{"class":605},[109,834,620],{"class":609},[109,836,606],{"class":605},[109,838,839],{"class":594},", ttl)\n",[19,841,842,843,846,847,846,850,853],{},"Now some keys expire in ",[22,844,845],{},"14 days",", some in ",[22,848,849],{},"15",[22,851,852],{},"16",".\nWhich means requests trickle back to the server instead of hitting it like a tsunami. 🌊",[11,855,857],{"id":856},"why-it-matters","Why It Matters",[19,859,860],{},"Without jitter:",[215,862,863],{},[218,864,865,866,869],{},"Day 14 → server gets ",[22,867,868],{},"millions of requests at once",". Boom. 🔥",[19,871,872],{},"With jitter:",[215,874,875,878,881,884],{},[218,876,877],{},"Day 14 → some requests",[218,879,880],{},"Day 15 → some more",[218,882,883],{},"Day 16 → a few more",[218,885,886],{},"Server is chill. 😎",[19,888,889,890,893],{},"This small change can ",[22,891,892],{},"save your entire system"," from crashing.",[11,895,897],{"id":896},"final-thoughts","Final Thoughts",[19,899,900],{},"Caching is powerful, but it comes with hidden gotchas.",[215,902,903,906,909],{},[218,904,905],{},"Infinite TTL? Your cache becomes a junkyard.",[218,907,908],{},"Fixed TTL? Your server might collapse in 14 days like a time bomb.",[218,910,911],{},"TTL with jitter? Balanced, safe, and production-ready.",[19,913,914,915],{},"So the next time you set a cache TTL, remember:\n👉 ",[37,916,917],{},"Always sprinkle some randomness in your Redis life.",[19,919,920],{},"Your future self (and your backend servers) will thank you. 🙏",[19,922,923,924,927,928,931],{},"Do you want me to also add a ",[22,925,926],{},"diagram (ASCII or image idea)"," showing the difference between ",[37,929,930],{},"no jitter vs jitter"," so it’s more visually clear for the blog?",[491,933,934],{},"html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sAOxA, html code.shiki .sAOxA{--shiki-default:#50FA7B}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html pre.shiki code .sIQBb, html code.shiki .sIQBb{--shiki-default:#BD93F9}html pre.shiki code .shSDL, html code.shiki .shSDL{--shiki-default:#6272A4}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}",{"title":105,"searchDepth":118,"depth":118,"links":936},[937,938,939,940,941,942,943],{"id":525,"depth":124,"text":526},{"id":537,"depth":124,"text":538},{"id":570,"depth":124,"text":571},{"id":645,"depth":124,"text":646},{"id":682,"depth":124,"text":683},{"id":856,"depth":124,"text":857},{"id":896,"depth":124,"text":897},"Recently, I ran into an interesting Redis case that taught me a big lesson Infinite cache TTLs are like hoarding—things pile up until it’s a problem.",{"date":946,"image":947,"alt":520,"tags":948,"published":139},"18th Sep 2025","/blogs-img/blog7.png",[949,950,699],"redis","ttl","/blogs/redis-ttl-jitter-and-how-i-almost-crashed-a-server",{"title":520,"description":944},"blogs/7. redis-ttl-jitter-and-how-i-almost-crashed-a-server","JbcEvgf3w-iEDJUcwtcUwf69SX0KVJFwDCBrjw7iIl4",{"id":956,"title":957,"body":958,"description":1090,"extension":506,"meta":1091,"navigation":139,"ogImage":1093,"path":1096,"seo":1097,"stem":1098,"__hash__":1099},"content/blogs/6. how-to-fix-vuex-type-issue.md","How to fix vuex type issue",{"type":8,"value":959,"toc":1086},[960,964,967,971,984,1078,1083],[11,961,963],{"id":962},"introduction","Introduction",[19,965,966],{},"In recent version of our vue project, when we try to add vuex we see type error and vuex type not found. We can easily fix that issue.",[11,968,970],{"id":969},"how-to-fix-that-issue","How to fix that issue",[972,973,974,981],"ol",{},[218,975,976,977,980],{},"Create a ",[26,978,979],{},"vuex.d.ts"," file inside of your route project.",[218,982,983],{},"Pase this code in that file",[100,985,989],{"className":986,"code":987,"language":988,"meta":105,"style":105},"language-ts shiki shiki-themes dracula","declare module 'vuex' {\n  export * from 'vuex/types/index.d.ts'\n  export * from 'vuex/types/helpers.d.ts'\n  export * from 'vuex/types/logger.d.ts'\n  export * from 'vuex/types/vue.d.ts'\n}\n","ts",[26,990,991,1010,1028,1043,1058,1073],{"__ignoreMap":105},[109,992,993,996,999,1002,1005,1007],{"class":111,"line":112},[109,994,995],{"class":715},"declare",[109,997,998],{"class":715}," module",[109,1000,1001],{"class":605}," '",[109,1003,1004],{"class":609},"vuex",[109,1006,606],{"class":605},[109,1008,1009],{"class":594}," {\n",[109,1011,1012,1015,1017,1020,1022,1025],{"class":111,"line":118},[109,1013,1014],{"class":715},"  export",[109,1016,728],{"class":628},[109,1018,1019],{"class":715}," from",[109,1021,1001],{"class":605},[109,1023,1024],{"class":609},"vuex/types/index.d.ts",[109,1026,1027],{"class":605},"'\n",[109,1029,1030,1032,1034,1036,1038,1041],{"class":111,"line":124},[109,1031,1014],{"class":715},[109,1033,728],{"class":628},[109,1035,1019],{"class":715},[109,1037,1001],{"class":605},[109,1039,1040],{"class":609},"vuex/types/helpers.d.ts",[109,1042,1027],{"class":605},[109,1044,1045,1047,1049,1051,1053,1056],{"class":111,"line":130},[109,1046,1014],{"class":715},[109,1048,728],{"class":628},[109,1050,1019],{"class":715},[109,1052,1001],{"class":605},[109,1054,1055],{"class":609},"vuex/types/logger.d.ts",[109,1057,1027],{"class":605},[109,1059,1060,1062,1064,1066,1068,1071],{"class":111,"line":136},[109,1061,1014],{"class":715},[109,1063,728],{"class":628},[109,1065,1019],{"class":715},[109,1067,1001],{"class":605},[109,1069,1070],{"class":609},"vuex/types/vue.d.ts",[109,1072,1027],{"class":605},[109,1074,1075],{"class":111,"line":143},[109,1076,1077],{"class":594},"}\n",[972,1079,1080],{"start":124},[218,1081,1082],{},"That's it. Your are ok to go.",[491,1084,1085],{},"html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sIQBb, html code.shiki .sIQBb{--shiki-default:#BD93F9}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":105,"searchDepth":118,"depth":118,"links":1087},[1088,1089],{"id":962,"depth":124,"text":963},{"id":969,"depth":124,"text":970},"In recent vue project we see that vuex type not working properly. We will fix that type issue and make vuex type workable",{"date":1092,"image":1093,"alt":957,"tags":1094,"published":139},"9th June 2024","/blogs-img/blog6.png",[1095,1004],"vue","/blogs/how-to-fix-vuex-type-issue",{"title":957,"description":1090},"blogs/6. how-to-fix-vuex-type-issue","KjYfF58RrMXi2ToDGOoD_HxP_t9t2tEQMqgrhq25OSc",[1101,1180,1368],{"id":1102,"title":1103,"body":1104,"description":1169,"extension":506,"meta":1170,"navigation":139,"ogImage":1172,"path":1176,"seo":1177,"stem":1178,"__hash__":1179},"content/blogs/1. connect-namecheap-to-vercel.md","How To Connect You Namecheap Domain With Vercel Deployed App",{"type":8,"value":1105,"toc":1161},[1106,1108,1111,1115,1118,1122,1125,1128,1132,1135,1138,1141,1144,1148,1151,1154,1158],[11,1107,963],{"id":962},[19,1109,1110],{},"If you've purchased a domain from Namecheap and you want to connect it to your Vercel app, there are a few steps you need to follow. In this blog, we'll guide you through the process of connecting your Namecheap domain with your Vercel app.",[11,1112,1114],{"id":1113},"step-1-add-a-custom-domain-to-your-vercel-app","Step 1: Add a custom domain to your Vercel app",[19,1116,1117],{},"The first step is to add your custom domain to your Vercel app. To do this, log in to your Vercel account and go to your app dashboard. Click on \"Settings\" and then \"Domains\". Click on \"Add Domain\" and enter your custom domain name. Then click on \"Add\".",[11,1119,1121],{"id":1120},"step-2-get-the-dns-records-from-vercel","Step 2: Get the DNS records from Vercel",[19,1123,1124],{},"Once you've added your custom domain to your Vercel app, you'll need to get the DNS records from Vercel. To do this, go back to the \"Domains\" section and click on the custom domain you just added. Then click on \"DNS Records\".",[19,1126,1127],{},"You'll see a list of DNS records that you need to add to your Namecheap account. These include the A record, the CNAME record, and the TXT record.",[11,1129,1131],{"id":1130},"step-3-add-dns-records-to-namecheap","Step 3: Add DNS records to Namecheap",[19,1133,1134],{},"Now that you have the DNS records from Vercel, you need to add them to your Namecheap account. To do this, log in to your Namecheap account and go to your domain dashboard. Click on \"Advanced DNS\" and then \"Add New Record\".",[19,1136,1137],{},"Add the A record first. In the \"Type\" dropdown menu, select \"A (Address)\". In the \"Host\" field, enter \"@\" (without the quotes). In the \"Value\" field, enter the IP address from the Vercel DNS records.",[19,1139,1140],{},"Next, add the CNAME record. In the \"Type\" dropdown menu, select \"CNAME (Alias)\". In the \"Host\" field, enter \"www\" (without the quotes). In the \"Value\" field, enter the value from the Vercel DNS records.",[19,1142,1143],{},"Finally, add the TXT record. In the \"Type\" dropdown menu, select \"TXT (Text)\". In the \"Host\" field, enter \"@\" (without the quotes). In the \"Value\" field, enter the value from the Vercel DNS records.",[11,1145,1147],{"id":1146},"step-4-verify-dns-records","Step 4: Verify DNS records",[19,1149,1150],{},"Once you've added the DNS records to your Namecheap account, you need to verify that they're correct. To do this, go back to your Vercel app dashboard and click on the custom domain. Then click on \"Verify DNS Configuration\". Vercel will check if the DNS records have been set up correctly.",[19,1152,1153],{},"It may take some time for the DNS records to propagate, so be patient. Once the DNS records have propagated, Vercel will verify them and your custom domain will be connected to your Vercel app.",[11,1155,1157],{"id":1156},"conclusion","Conclusion",[19,1159,1160],{},"Connecting your Namecheap domain to your Vercel app is a relatively simple process. By following the steps outlined in this blog, you'll be able to connect your custom domain in no time. Remember to be patient as it may take some time for the DNS records to propagate. If you run into any issues, don't hesitate to reach out to Vercel support for assistance.",{"title":105,"searchDepth":118,"depth":118,"links":1162},[1163,1164,1165,1166,1167,1168],{"id":962,"depth":124,"text":963},{"id":1113,"depth":124,"text":1114},{"id":1120,"depth":124,"text":1121},{"id":1130,"depth":124,"text":1131},{"id":1146,"depth":124,"text":1147},{"id":1156,"depth":124,"text":1157},"Here you will lean how to connect your namecheap domain to vercel deployed app.",{"date":1171,"image":1172,"alt":1103,"tags":1173,"published":139},"1st Mar 2023","/blogs-img/blog1.png",[1174,1175],"namecheap","vercel","/blogs/connect-namecheap-to-vercel",{"title":1103,"description":1169},"blogs/1. connect-namecheap-to-vercel","bGgpzxn7NPfj54jaw5rAmvTM-8wo2NliFK0_7MXyqbM",{"id":1181,"title":1182,"body":1183,"description":1356,"extension":506,"meta":1357,"navigation":139,"ogImage":1359,"path":1364,"seo":1365,"stem":1366,"__hash__":1367},"content/blogs/2. fix-tailwindcss-intellisense-in-nuxt3.md","How To Fix TailwindCSS Intellisense In Nuxt3 Project",{"type":8,"value":1184,"toc":1351},[1185,1189,1200,1204,1222,1226,1235,1259,1345,1348],[11,1186,1188],{"id":1187},"problems","Problems",[19,1190,1191,1192,1199],{},"I had a Nuxt3 and TailwindCSS project. which was opened in VsCode. But the problem was, in my project the tailwind intellisense didn't working properly. I tried to reinstall the vscode tailwind extension but the problem didn't solve properly. Later after doing some research I found a ",[1193,1194,1198],"a",{"href":1195,"rel":1196},"https://github.com/tailwindlabs/tailwindcss-intellisense/issues/663#issuecomment-1316788128",[1197],"nofollow","workaround",", That I am sharing here today.",[11,1201,1203],{"id":1202},"why-its-not-working","Why It's Not working",[19,1205,1206,1207,1210,1211,1214,1215,1218,1219,1221],{},"In our nuxt project we have a ",[26,1208,1209],{},".nuxt"," directory. Nuxt uses the ",[26,1212,1213],{},".nuxt/"," directory in development to generate your Vue application. And if we try to look properly there is also a file called ",[26,1216,1217],{},".nuxt/tailwind.config.cjs",", So tailwind find to config file in the same project, one is in your root directory and another one is in you ",[26,1220,1209],{}," directory.",[11,1223,1225],{"id":1224},"possible-workaround","Possible Workaround",[19,1227,1228,1229,1231,1232,1234],{},"One possible solution is, In your project we call tell the extension to exclude the ",[26,1230,1209],{}," directory. To exclude the ",[26,1233,1209],{}," directory in your workspace,",[215,1236,1237,1243,1254],{},[218,1238,976,1239,1242],{},[26,1240,1241],{},"/.vscode"," folder in your project's root level.",[218,1244,1245,1246,1249,1250,1253],{},"Inside ",[26,1247,1248],{},".vscode"," folder add a ",[26,1251,1252],{},"settings.json"," file",[218,1255,1256,1257,1253],{},"Copy the below code to ",[26,1258,1252],{},[100,1260,1264],{"className":1261,"code":1262,"language":1263,"meta":105,"style":105},"language-json shiki shiki-themes dracula","// /.vscode/settings.json\n{\n  \"tailwindCSS.files.exclude\": [\"**/.git/**\", \"**/node_modules/**\", \"**/.hg/**\", \"**/.svn/**\", \"**/.nuxt/**\"]\n}\n","json",[26,1265,1266,1271,1276,1341],{"__ignoreMap":105},[109,1267,1268],{"class":111,"line":112},[109,1269,1270],{"class":635},"// /.vscode/settings.json\n",[109,1272,1273],{"class":111,"line":118},[109,1274,1275],{"class":594},"{\n",[109,1277,1278,1282,1286,1289,1292,1295,1297,1300,1302,1304,1306,1309,1311,1313,1315,1318,1320,1322,1324,1327,1329,1331,1333,1336,1338],{"class":111,"line":124},[109,1279,1281],{"class":1280},"sY8FZ","  \"",[109,1283,1285],{"class":1284},"sLL85","tailwindCSS.files.exclude",[109,1287,1288],{"class":1280},"\"",[109,1290,1291],{"class":715},":",[109,1293,1294],{"class":594}," [",[109,1296,1288],{"class":605},[109,1298,1299],{"class":609},"**/.git/**",[109,1301,1288],{"class":605},[109,1303,625],{"class":594},[109,1305,1288],{"class":605},[109,1307,1308],{"class":609},"**/node_modules/**",[109,1310,1288],{"class":605},[109,1312,625],{"class":594},[109,1314,1288],{"class":605},[109,1316,1317],{"class":609},"**/.hg/**",[109,1319,1288],{"class":605},[109,1321,625],{"class":594},[109,1323,1288],{"class":605},[109,1325,1326],{"class":609},"**/.svn/**",[109,1328,1288],{"class":605},[109,1330,625],{"class":594},[109,1332,1288],{"class":605},[109,1334,1335],{"class":609},"**/.nuxt/**",[109,1337,1288],{"class":605},[109,1339,1340],{"class":594},"]\n",[109,1342,1343],{"class":111,"line":130},[109,1344,1077],{"class":594},[19,1346,1347],{},"Hopefully now tailwind intellisense start working properly.",[491,1349,1350],{},"html pre.shiki code .shSDL, html code.shiki .shSDL{--shiki-default:#6272A4}html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sY8FZ, html code.shiki .sY8FZ{--shiki-default:#8BE9FE}html pre.shiki code .sLL85, html code.shiki .sLL85{--shiki-default:#8BE9FD}html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":105,"searchDepth":118,"depth":118,"links":1352},[1353,1354,1355],{"id":1187,"depth":124,"text":1188},{"id":1202,"depth":124,"text":1203},{"id":1224,"depth":124,"text":1225},"In Nuxt3 project tailwind css intellisense doesn't seems to work properly. In this blog I will share a workaround to fix this issue.",{"date":1358,"image":1359,"alt":1360,"tags":1361,"published":139},"26th Jan 2023","/blogs-img/blog2.png","Hwo to fix tailwind intellisense in nuxt3 project",[1362,1363],"nuxt","tailwindcss","/blogs/fix-tailwindcss-intellisense-in-nuxt3",{"title":1182,"description":1356},"blogs/2. fix-tailwindcss-intellisense-in-nuxt3","qsiMF8MqnaOisvSGkRvEU1JI_rE-PS2e1Q3-HyF99a0",{"id":1369,"title":1370,"body":1371,"description":1422,"extension":506,"meta":1423,"navigation":139,"ogImage":1424,"path":1426,"seo":1427,"stem":1428,"__hash__":1429},"content/blogs/3. create-namespace-subdomain-connect-to-vercel.md","How To Create Namespace Subdomain & Connect To Vercel App",{"type":8,"value":1372,"toc":1414},[1373,1375,1378,1382,1385,1388,1392,1395,1399,1402,1406,1409,1411],[11,1374,963],{"id":962},[19,1376,1377],{},"Creating a subdomain on Namecheap and connecting it with a Vercel deployed app is a straightforward process. In this blog, we will guide you through the steps required to create a subdomain on Namecheap and connect it to your Vercel deployed app.",[11,1379,1381],{"id":1380},"step-1-create-a-subdomain-on-namecheap","Step 1: Create a subdomain on Namecheap",[19,1383,1384],{},"The first step is to create a subdomain on Namecheap. To do this, log in to your Namecheap account and go to your domain dashboard. Click on the \"Advanced DNS\" tab and then click on \"Add New Record\".",[19,1386,1387],{},"Select \"CNAME (Alias)\" from the \"Type\" dropdown menu. In the \"Host\" field, enter the name of your subdomain (for example, \"app\" if you want your subdomain to be \"app.yourdomain.com\"). In the \"Value\" field, enter the URL of your Vercel deployed app (for example, \"yourapp.vercel.app\").",[11,1389,1391],{"id":1390},"step-2-verify-the-subdomain","Step 2: Verify the subdomain",[19,1393,1394],{},"After creating the subdomain, you need to verify that it has been set up correctly. To do this, go to your Vercel deployed app dashboard and click on the \"Domains\" tab. Click on \"Add Domain\" and enter the name of your subdomain. Vercel will verify the subdomain and confirm that it has been set up correctly.",[11,1396,1398],{"id":1397},"step-3-add-the-subdomain-to-your-vercel-deployed-app","Step 3: Add the subdomain to your Vercel deployed app",[19,1400,1401],{},"Now that your subdomain has been verified, you need to add it to your Vercel deployed app. To do this, go to your app dashboard and click on \"Settings\". Click on \"Domains\" and then click on \"Add Domain\". Enter the name of your subdomain and click on \"Add\".",[11,1403,1405],{"id":1404},"step-4-verify-the-subdomain-in-vercel","Step 4: Verify the subdomain in Vercel",[19,1407,1408],{},"After adding the subdomain to your Vercel deployed app, you need to verify that it has been set up correctly. To do this, click on the subdomain in your Vercel deployed app dashboard. Click on \"Verify DNS Configuration\". Vercel will check that the subdomain has been set up correctly and confirm that it is connected to your Vercel deployed app.",[11,1410,1157],{"id":1156},[19,1412,1413],{},"Connecting a subdomain on Namecheap to your Vercel deployed app is a simple process that can be done in a few steps. By following the steps outlined in this blog, you can easily create a subdomain on Namecheap and connect it to your Vercel deployed app. Remember to verify your subdomain in both Namecheap and Vercel to ensure that it has been set up correctly. If you encounter any issues, reach out to Vercel support for assistance.",{"title":105,"searchDepth":118,"depth":118,"links":1415},[1416,1417,1418,1419,1420,1421],{"id":962,"depth":124,"text":963},{"id":1380,"depth":124,"text":1381},{"id":1390,"depth":124,"text":1391},{"id":1397,"depth":124,"text":1398},{"id":1404,"depth":124,"text":1405},{"id":1156,"depth":124,"text":1157},"Here we will learn, How To Create Namespace Subdomain & Connect To Vercel App",{"date":1171,"image":1424,"alt":1370,"tags":1425,"published":139},"/blogs-img/blog3.png",[1362,1175,1174],"/blogs/create-namespace-subdomain-connect-to-vercel",{"title":1370,"description":1422},"blogs/3. create-namespace-subdomain-connect-to-vercel","EIkKMBJAbAajjjWrIb1ov4GjZIbyuz97cdXqsjTqN4A",1786546105658]