[{"data":1,"prerenderedAt":983},["Reactive",2],{"/posts/node-js-nedir":3,"/posts/node-js-nedir:related":885,"/posts/node-js-nedir:alternate":982},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"read":11,"lang":12,"body":13,"_type":879,"_id":880,"_source":881,"_file":882,"_extension":883,"sitemap":884},"/posts/node-js-nedir","posts",false,"","Node.js nedir? Event loop, npm ve ilk HTTP sunucusu","Node.js nedir, ne işe yarar? Event loop'un sade bir anlatımı, npm, sıfırdan bir HTTP sunucusu ve Node.js'in diğer backend seçenekleri arasındaki yeri.","2026-11-21","9 dk","tr",{"type":14,"children":15,"toc":859},"root",[16,24,29,36,41,46,85,99,105,149,154,160,165,170,175,180,192,197,207,220,233,239,254,259,264,275,281,286,291,300,313,322,380,385,394,400,412,421,432,441,450,463,472,486,499,505,518,527,556,562,567,569,659,664,677,683,688,755,767,773,780,785,791,810,816,821,827,832,838],{"type":17,"tag":18,"props":19,"children":20},"element","p",{},[21],{"type":22,"value":23},"text","Node.js, JavaScript'i tarayıcının dışında, yani sunucuda, terminalde ya da kendi bilgisayarınızda çalıştırmanızı sağlayan bir runtime. Node js nedir diye arayan çoğu kişi aslında şunu soruyor: frontend'de kullandığım JavaScript'le backend de yazabilir miyim? Evet, Node.js tam olarak bunun için var.",{"type":17,"tag":18,"props":25,"children":26},{},[27],{"type":22,"value":28},"Bugün backend servislerini Node.js, NestJS ve TypeScript ile, PostgreSQL üzerinde yazıyorum. Bu yazıda Node.js'in ne olduğunu, event loop'un nasıl çalıştığını, npm'i ve sıfırdan küçük bir HTTP sunucusunu anlatıyorum. Sonunda da Node.js'in hangi işlere uyup hangilerine uymadığına bakıyoruz.",{"type":17,"tag":30,"props":31,"children":33},"h2",{"id":32},"nodejs-nedir-ne-işe-yarar",[34],{"type":22,"value":35},"Node.js nedir, ne işe yarar?",{"type":17,"tag":18,"props":37,"children":38},{},[39],{"type":22,"value":40},"JavaScript uzun yıllar yalnızca tarayıcıda çalışan bir dildi. Node.js, 2009'da Ryan Dahl tarafından, Chrome'un JavaScript motoru V8'in üzerine kuruldu. V8 JavaScript kodunu çalıştırıyor, Node.js de ona tarayıcıda olmayan yetenekleri ekliyor: dosya okuyup yazmak, ağ bağlantısı açmak, HTTP sunucusu kurmak, işletim sistemi süreçleriyle konuşmak.",{"type":17,"tag":18,"props":42,"children":43},{},[44],{"type":22,"value":45},"Node.js ile yapılan yaygın işler:",{"type":17,"tag":47,"props":48,"children":49},"ul",{},[50,56,61,75,80],{"type":17,"tag":51,"props":52,"children":53},"li",{},[54],{"type":22,"value":55},"REST ve GraphQL API'leri, yani bir uygulamanın backend'i",{"type":17,"tag":51,"props":57,"children":58},{},[59],{"type":22,"value":60},"WebSocket ile gerçek zamanlı uygulamalar (sohbet, canlı bildirim, ortak düzenleme)",{"type":17,"tag":51,"props":62,"children":63},{},[64,66,73],{"type":22,"value":65},"Komut satırı araçları (",{"type":17,"tag":67,"props":68,"children":70},"code",{"className":69},[],[71],{"type":22,"value":72},"npx",{"type":22,"value":74}," ile çalıştırdığınız paketler Node.js üzerinde çalışıyor)",{"type":17,"tag":51,"props":76,"children":77},{},[78],{"type":22,"value":79},"Vite, webpack gibi frontend build araçları",{"type":17,"tag":51,"props":81,"children":82},{},[83],{"type":22,"value":84},"Electron ile masaüstü uygulamaları",{"type":17,"tag":18,"props":86,"children":87},{},[88,90,97],{"type":22,"value":89},"API kavramına yabancıysanız önce ",{"type":17,"tag":91,"props":92,"children":94},"a",{"href":93},"/posts/api-nedir",[95],{"type":22,"value":96},"API nedir",{"type":22,"value":98}," yazısına bakmanızı öneririm, Node.js ile yazılan şeylerin çoğu bir API.",{"type":17,"tag":30,"props":100,"children":102},{"id":101},"nodejs-bir-programlama-dili-mi",[103],{"type":22,"value":104},"Node.js bir programlama dili mi?",{"type":17,"tag":18,"props":106,"children":107},{},[108,110,116,118,124,126,131,133,139,141,147],{"type":22,"value":109},"Hayır. Dil JavaScript, Node.js onu çalıştıran ortam. Tarayıcıdaki JavaScript ile Node.js'deki JavaScript aynı dil, ama erişebildikleri şeyler farklı. Tarayıcıda ",{"type":17,"tag":67,"props":111,"children":113},{"className":112},[],[114],{"type":22,"value":115},"document",{"type":22,"value":117}," ve ",{"type":17,"tag":67,"props":119,"children":121},{"className":120},[],[122],{"type":22,"value":123},"window",{"type":22,"value":125}," var, dosya sistemine erişim yok. Node.js'de ",{"type":17,"tag":67,"props":127,"children":129},{"className":128},[],[130],{"type":22,"value":115},{"type":22,"value":132}," yok, ama ",{"type":17,"tag":67,"props":134,"children":136},{"className":135},[],[137],{"type":22,"value":138},"fs",{"type":22,"value":140}," modülüyle dosya okuyabiliyor, ",{"type":17,"tag":67,"props":142,"children":144},{"className":143},[],[145],{"type":22,"value":146},"http",{"type":22,"value":148}," modülüyle sunucu açabiliyorsunuz.",{"type":17,"tag":18,"props":150,"children":151},{},[152],{"type":22,"value":153},"Node.js bir framework de değil. Express ve NestJS framework, Node.js'in üzerinde çalışıyorlar.",{"type":17,"tag":30,"props":155,"children":157},{"id":156},"event-loop-nedir-sade-bir-anlatım",[158],{"type":22,"value":159},"Event loop nedir? Sade bir anlatım",{"type":17,"tag":18,"props":161,"children":162},{},[163],{"type":22,"value":164},"Node.js'i diğer backend ortamlarından ayıran şey çalışma modeli. JavaScript kodunuz tek bir thread'de çalışıyor. İlk duyduğunuzda bu bir dezavantaj gibi geliyor: tek thread nasıl binlerce isteğe cevap verecek?",{"type":17,"tag":18,"props":166,"children":167},{},[168],{"type":22,"value":169},"Cevap, beklemenin nasıl yapıldığında. Bir web sunucusunun zamanının büyük kısmı hesap yapmakla değil beklemekle geçiyor: veritabanından cevap beklemek, diskten dosya okumak, başka bir API'yi çağırmak. Node.js bu bekleme işlerini işletim sistemine ya da arka plandaki bir thread havuzuna (libuv) devrediyor ve beklerken başka işlere bakıyor. İş bittiğinde, o işe verdiğiniz callback bir kuyruğa giriyor. Event loop da bu kuyruğu sürekli dönen, sırası gelen callback'i çalıştıran döngü.",{"type":17,"tag":18,"props":171,"children":172},{},[173],{"type":22,"value":174},"Bir restorandaki garson gibi düşünün. Garson siparişi alıyor, mutfağa iletiyor ve yemek pişene kadar mutfağın önünde beklemiyor. Diğer masalara bakıyor. Yemek hazır olunca alıp masaya götürüyor. Tek bir garson bu şekilde birçok masaya yetişebiliyor.",{"type":17,"tag":18,"props":176,"children":177},{},[178],{"type":22,"value":179},"Bunu kodda görmek için:",{"type":17,"tag":181,"props":182,"children":187},"pre",{"className":183,"code":185,"language":186,"meta":7},[184],"language-js","const fs = require(\"node:fs\");\n\nconsole.log(\"1. başladı\");\n\nfs.readFile(__filename, () => {\n  console.log(\"3. dosya okundu\");\n});\n\nsetTimeout(() => {\n  console.log(\"4. zamanlayıcı bitti\");\n}, 100);\n\nconsole.log(\"2. bitti, ama işler hâlâ sürüyor\");\n","js",[188],{"type":17,"tag":67,"props":189,"children":190},{"__ignoreMap":7},[191],{"type":22,"value":185},{"type":17,"tag":18,"props":193,"children":194},{},[195],{"type":22,"value":196},"Çıktı:",{"type":17,"tag":181,"props":198,"children":202},{"className":199,"code":201,"language":22,"meta":7},[200],"language-text","1. başladı\n2. bitti, ama işler hâlâ sürüyor\n3. dosya okundu\n4. zamanlayıcı bitti\n",[203],{"type":17,"tag":67,"props":204,"children":205},{"__ignoreMap":7},[206],{"type":22,"value":201},{"type":17,"tag":18,"props":208,"children":209},{},[210,212,218],{"type":22,"value":211},"Dosya okuma ve zamanlayıcı başlatıldı ama kod onları beklemeden devam etti. İkisi bittiğinde callback'leri sırayla çalıştı. Bugün çoğu kodu callback yerine ",{"type":17,"tag":67,"props":213,"children":215},{"className":214},[],[216],{"type":22,"value":217},"async/await",{"type":22,"value":219}," ile yazıyoruz, ama alttaki mekanizma aynı.",{"type":17,"tag":18,"props":221,"children":222},{},[223,225,231],{"type":22,"value":224},"Bu modelin bir sınırı var: event loop'u kendi kodunuz meşgul ederse her şey duruyor. Büyük bir dosyayı senkron sıkıştırmak ya da milyonlarca elemanlı bir diziyi tek seferde sıralamak gibi ağır CPU işleri, o iş bitene kadar diğer isteklerin cevaplanmasını engelliyor. Böyle işler için ",{"type":17,"tag":67,"props":226,"children":228},{"className":227},[],[229],{"type":22,"value":230},"worker_threads",{"type":22,"value":232}," modülü ya da işi ayrı bir servise taşımak gerekiyor.",{"type":17,"tag":30,"props":234,"children":236},{"id":235},"nodejs-nasıl-kurulur",[237],{"type":22,"value":238},"Node.js nasıl kurulur?",{"type":17,"tag":18,"props":240,"children":241},{},[242,244,252],{"type":22,"value":243},"En kolayı ",{"type":17,"tag":91,"props":245,"children":249},{"href":246,"rel":247},"https://nodejs.org/",[248],"noopener",[250],{"type":22,"value":251},"nodejs.org",{"type":22,"value":253}," adresinden LTS sürümünü indirmek. LTS (Long Term Support) uzun süre güvenlik güncellemesi alan sürüm ve production için Node.js'in kendi önerisi de bu. Şu anda LTS olan sürümler 26 (Lithium), 24 (Krypton) ve 22 (Jod). Node.js 27 ile birlikte takvim değişiyor: her yıl bir ana sürüm çıkacak ve her biri LTS olacak.",{"type":17,"tag":18,"props":255,"children":256},{},[257],{"type":22,"value":258},"Birden fazla projeyle çalışıyorsanız nvm ya da fnm gibi bir sürüm yöneticisi kullanmak daha rahat. Projeler arasında Node sürümünü tek komutla değiştirebiliyorsunuz.",{"type":17,"tag":18,"props":260,"children":261},{},[262],{"type":22,"value":263},"Kurulumdan sonra:",{"type":17,"tag":181,"props":265,"children":270},{"className":266,"code":268,"language":269,"meta":7},[267],"language-bash","node -v\nnpm -v\n","bash",[271],{"type":17,"tag":67,"props":272,"children":273},{"__ignoreMap":7},[274],{"type":22,"value":268},{"type":17,"tag":30,"props":276,"children":278},{"id":277},"npm-nedir",[279],{"type":22,"value":280},"npm nedir?",{"type":17,"tag":18,"props":282,"children":283},{},[284],{"type":22,"value":285},"npm, Node.js ile birlikte gelen paket yöneticisi. Başkalarının yazdığı kütüphaneleri projenize eklemenizi, kendi kütüphanelerinizi de yayınlamanızı sağlıyor.",{"type":17,"tag":18,"props":287,"children":288},{},[289],{"type":22,"value":290},"Yeni bir proje başlatmak:",{"type":17,"tag":181,"props":292,"children":295},{"className":293,"code":294,"language":269,"meta":7},[267],"mkdir benim-api && cd benim-api\nnpm init -y\n",[296],{"type":17,"tag":67,"props":297,"children":298},{"__ignoreMap":7},[299],{"type":22,"value":294},{"type":17,"tag":18,"props":301,"children":302},{},[303,305,311],{"type":22,"value":304},"Bu komut bir ",{"type":17,"tag":67,"props":306,"children":308},{"className":307},[],[309],{"type":22,"value":310},"package.json",{"type":22,"value":312}," oluşturuyor. Projenin adı, sürümü, bağımlılıkları ve script'leri bu dosyada duruyor. Bir paket kurduğunuzda:",{"type":17,"tag":181,"props":314,"children":317},{"className":315,"code":316,"language":269,"meta":7},[267],"npm install express\n",[318],{"type":17,"tag":67,"props":319,"children":320},{"__ignoreMap":7},[321],{"type":22,"value":316},{"type":17,"tag":18,"props":323,"children":324},{},[325,327,333,335,340,342,348,350,356,358,363,365,370,372,378],{"type":22,"value":326},"paket ",{"type":17,"tag":67,"props":328,"children":330},{"className":329},[],[331],{"type":22,"value":332},"node_modules",{"type":22,"value":334}," klasörüne iniyor, ",{"type":17,"tag":67,"props":336,"children":338},{"className":337},[],[339],{"type":22,"value":310},{"type":22,"value":341}," içindeki ",{"type":17,"tag":67,"props":343,"children":345},{"className":344},[],[346],{"type":22,"value":347},"dependencies",{"type":22,"value":349}," listesine ekleniyor ve kurulan tam sürümler ",{"type":17,"tag":67,"props":351,"children":353},{"className":352},[],[354],{"type":22,"value":355},"package-lock.json",{"type":22,"value":357}," dosyasına yazılıyor. ",{"type":17,"tag":67,"props":359,"children":361},{"className":360},[],[362],{"type":22,"value":332},{"type":22,"value":364}," klasörünü git'e eklemiyorsunuz, ",{"type":17,"tag":67,"props":366,"children":368},{"className":367},[],[369],{"type":22,"value":355},{"type":22,"value":371}," dosyasını ekliyorsunuz. Başka biri projeyi klonladığında ",{"type":17,"tag":67,"props":373,"children":375},{"className":374},[],[376],{"type":22,"value":377},"npm ci",{"type":22,"value":379}," ile aynı sürümleri kuruyor.",{"type":17,"tag":18,"props":381,"children":382},{},[383],{"type":22,"value":384},"Sık kullandığım komutlar:",{"type":17,"tag":181,"props":386,"children":389},{"className":387,"code":388,"language":269,"meta":7},[267],"npm install            # package.json'daki her şeyi kur\nnpm install -D vitest  # sadece geliştirmede gereken bir paket\nnpm run dev            # package.json'daki \"dev\" script'ini çalıştır\nnpx random-memes       # bir paketi kurmadan tek seferlik çalıştır\n",[390],{"type":17,"tag":67,"props":391,"children":392},{"__ignoreMap":7},[393],{"type":22,"value":388},{"type":17,"tag":30,"props":395,"children":397},{"id":396},"nodejs-ile-basit-bir-http-sunucusu",[398],{"type":22,"value":399},"Node.js ile basit bir HTTP sunucusu",{"type":17,"tag":18,"props":401,"children":402},{},[403,405,410],{"type":22,"value":404},"Hiçbir paket kurmadan, yalnızca Node.js'in kendi ",{"type":17,"tag":67,"props":406,"children":408},{"className":407},[],[409],{"type":22,"value":146},{"type":22,"value":411}," modülüyle bir sunucu:",{"type":17,"tag":181,"props":413,"children":416},{"className":414,"code":415,"language":186,"meta":7},[184],"const http = require(\"node:http\");\n\nconst server = http.createServer((req, res) => {\n  if (req.method === \"GET\" && req.url === \"/merhaba\") {\n    res.writeHead(200, { \"Content-Type\": \"application/json\" });\n    res.end(JSON.stringify({ mesaj: \"Merhaba, Node.js!\" }));\n    return;\n  }\n\n  res.writeHead(404, { \"Content-Type\": \"application/json\" });\n  res.end(JSON.stringify({ hata: \"Bulunamadı\" }));\n});\n\nserver.listen(3000, () => {\n  console.log(\"Sunucu http://localhost:3000 adresinde çalışıyor\");\n});\n",[417],{"type":17,"tag":67,"props":418,"children":419},{"__ignoreMap":7},[420],{"type":22,"value":415},{"type":17,"tag":18,"props":422,"children":423},{},[424,430],{"type":17,"tag":67,"props":425,"children":427},{"className":426},[],[428],{"type":22,"value":429},"server.js",{"type":22,"value":431}," olarak kaydedip çalıştırın, başka bir terminalden de isteği atın:",{"type":17,"tag":181,"props":433,"children":436},{"className":434,"code":435,"language":269,"meta":7},[267],"node server.js\ncurl -i http://localhost:3000/merhaba\n",[437],{"type":17,"tag":67,"props":438,"children":439},{"__ignoreMap":7},[440],{"type":22,"value":435},{"type":17,"tag":181,"props":442,"children":445},{"className":443,"code":444,"language":22,"meta":7},[200],"HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\"mesaj\":\"Merhaba, Node.js!\"}\n",[446],{"type":17,"tag":67,"props":447,"children":448},{"__ignoreMap":7},[449],{"type":22,"value":444},{"type":17,"tag":18,"props":451,"children":452},{},[453,455,461],{"type":22,"value":454},"Küçük bir iş için bu yetiyor. Ama route sayısı arttıkça ",{"type":17,"tag":67,"props":456,"children":458},{"className":457},[],[459],{"type":22,"value":460},"if",{"type":22,"value":462}," blokları büyüyor, gövdeyi okumak, hataları yakalamak, middleware eklemek elle yapılınca yoruyor. Burada framework'ler devreye giriyor. Aynı endpoint Express ile:",{"type":17,"tag":181,"props":464,"children":467},{"className":465,"code":466,"language":186,"meta":7},[184],"const express = require(\"express\");\n\nconst app = express();\n\napp.get(\"/merhaba\", (req, res) => {\n  res.json({ mesaj: \"Merhaba, Express!\" });\n});\n\napp.listen(3000);\n",[468],{"type":17,"tag":67,"props":469,"children":470},{"__ignoreMap":7},[471],{"type":22,"value":466},{"type":17,"tag":18,"props":473,"children":474},{},[475,477,484],{"type":22,"value":476},"Express küçük ve esnek. Proje büyüdükçe klasör yapısını, doğrulamayı, bağımlılıkları nasıl yöneteceğinize siz karar veriyorsunuz. NestJS ise bu kararların çoğunu sizin yerinize veriyor: modüller, controller'lar, servisler, dependency injection ve decorator'larla TypeScript üzerine kurulu bir yapı. Şu anki işimde backend servislerini NestJS ile yazıyorum. Birden fazla kişinin aynı kod tabanında çalıştığı projelerde bu yapı işleri kolaylaştırıyor. NestJS için yazdığım ",{"type":17,"tag":91,"props":478,"children":481},{"href":479,"rel":480},"https://github.com/halitsever/nest-cloudflare-turnstile",[248],[482],{"type":22,"value":483},"nest-cloudflare-turnstile",{"type":22,"value":485}," kütüphanesi de Cloudflare Turnstile captcha doğrulamasını bir guard ve bir decorator olarak ekliyor.",{"type":17,"tag":18,"props":487,"children":488},{},[489,491,497],{"type":22,"value":490},"Express uygulamasını sunucusuz bir ortamda çalıştırmak isterseniz ",{"type":17,"tag":91,"props":492,"children":494},{"href":493},"/posts/deploy-express-app-on-vercel",[495],{"type":22,"value":496},"Express uygulamasını Vercel'e deploy etmek",{"type":22,"value":498}," üzerine bir yazım da var.",{"type":17,"tag":30,"props":500,"children":502},{"id":501},"nodejsi-typescript-ile-kullanmak",[503],{"type":22,"value":504},"Node.js'i TypeScript ile kullanmak",{"type":17,"tag":18,"props":506,"children":507},{},[508,510,516],{"type":22,"value":509},"Büyük bir Node.js projesinde JavaScript'in tip kontrolü olmaması zamanla can sıkıyor. İş yerinde yazdığım Node.js servisleri bu yüzden TypeScript ile. Güncel Node.js sürümleri (22.18 ve 23.6'dan itibaren) yalnızca tip açıklaması içeren ",{"type":17,"tag":67,"props":511,"children":513},{"className":512},[],[514],{"type":22,"value":515},".ts",{"type":22,"value":517}," dosyalarını ek bir araç olmadan çalıştırabiliyor:",{"type":17,"tag":181,"props":519,"children":522},{"className":520,"code":521,"language":269,"meta":7},[267],"node server.ts\n",[523],{"type":17,"tag":67,"props":524,"children":525},{"__ignoreMap":7},[526],{"type":22,"value":521},{"type":17,"tag":18,"props":528,"children":529},{},[530,532,538,540,546,548,554],{"type":22,"value":531},"Node.js burada tipleri silip kodu çalıştırıyor, tip kontrolü yapmıyor. ",{"type":17,"tag":67,"props":533,"children":535},{"className":534},[],[536],{"type":22,"value":537},"enum",{"type":22,"value":539}," gibi JavaScript'e çevrilmesi gereken özellikleri de desteklemiyor. Tip kontrolü için yine ",{"type":17,"tag":67,"props":541,"children":543},{"className":542},[],[544],{"type":22,"value":545},"tsc",{"type":22,"value":547}," gerekiyor. Detaylar ",{"type":17,"tag":91,"props":549,"children":551},{"href":550},"/posts/typescript-nedir",[552],{"type":22,"value":553},"TypeScript nedir",{"type":22,"value":555}," yazısında.",{"type":17,"tag":30,"props":557,"children":559},{"id":558},"nodejs-nerede-kullanılır-nerede-kullanılmaz",[560],{"type":22,"value":561},"Node.js nerede kullanılır, nerede kullanılmaz?",{"type":17,"tag":18,"props":563,"children":564},{},[565],{"type":22,"value":566},"Node.js her backend sorununun cevabı değil. Benim gördüğüm tablo şu:",{"type":22,"value":568},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":17,"tag":570,"props":571,"children":572},"table",{},[573,591],{"type":17,"tag":574,"props":575,"children":576},"thead",{},[577],{"type":17,"tag":12,"props":578,"children":579},{},[580,586],{"type":17,"tag":581,"props":582,"children":583},"th",{},[584],{"type":22,"value":585},"İş",{"type":17,"tag":581,"props":587,"children":588},{},[589],{"type":22,"value":590},"Node.js uygun mu?",{"type":17,"tag":592,"props":593,"children":594},"tbody",{},[595,609,621,633,646],{"type":17,"tag":12,"props":596,"children":597},{},[598,604],{"type":17,"tag":599,"props":600,"children":601},"td",{},[602],{"type":22,"value":603},"REST/GraphQL API, çok sayıda kısa istek",{"type":17,"tag":599,"props":605,"children":606},{},[607],{"type":22,"value":608},"Çok uygun",{"type":17,"tag":12,"props":610,"children":611},{},[612,617],{"type":17,"tag":599,"props":613,"children":614},{},[615],{"type":22,"value":616},"WebSocket, gerçek zamanlı uygulama",{"type":17,"tag":599,"props":618,"children":619},{},[620],{"type":22,"value":608},{"type":17,"tag":12,"props":622,"children":623},{},[624,629],{"type":17,"tag":599,"props":625,"children":626},{},[627],{"type":22,"value":628},"Frontend ile aynı dili paylaşan full stack ekip",{"type":17,"tag":599,"props":630,"children":631},{},[632],{"type":22,"value":608},{"type":17,"tag":12,"props":634,"children":635},{},[636,641],{"type":17,"tag":599,"props":637,"children":638},{},[639],{"type":22,"value":640},"CLI araçları, script'ler",{"type":17,"tag":599,"props":642,"children":643},{},[644],{"type":22,"value":645},"Uygun",{"type":17,"tag":12,"props":647,"children":648},{},[649,654],{"type":17,"tag":599,"props":650,"children":651},{},[652],{"type":22,"value":653},"Video işleme, ağır hesaplama, makine öğrenmesi",{"type":17,"tag":599,"props":655,"children":656},{},[657],{"type":22,"value":658},"Genelde başka bir dil daha iyi",{"type":17,"tag":18,"props":660,"children":661},{},[662],{"type":22,"value":663},"Go, Java, C# ya da Python ile de aynı API'yi yazabilirsiniz. Node.js'in asıl avantajı dilden çok ekosistem ve ekip: frontend'de JavaScript ya da TypeScript yazan bir ekip, backend'e geçerken yeni bir dil öğrenmek zorunda kalmıyor, tipleri ve doğrulama kodunu iki taraf arasında paylaşabiliyor. Ağır hesaplama gereken bir iş varsa onu ayrı bir servise koyup Node.js ile konuşturmak da yaygın bir yöntem.",{"type":17,"tag":18,"props":665,"children":666},{},[667,669,675],{"type":22,"value":668},"Backend'in genel olarak ne olduğunu ve hangi parçalardan oluştuğunu ",{"type":17,"tag":91,"props":670,"children":672},{"href":671},"/posts/backend-nedir",[673],{"type":22,"value":674},"Backend nedir",{"type":22,"value":676}," yazısında anlattım.",{"type":17,"tag":30,"props":678,"children":680},{"id":679},"benim-yazdığım-nodejs-kütüphaneleri",[681],{"type":22,"value":682},"Benim yazdığım Node.js kütüphaneleri",{"type":17,"tag":18,"props":684,"children":685},{},[686],{"type":22,"value":687},"npm'e yayınladığım birkaç küçük Node.js kütüphanesi var. Hepsi açık kaynak ve MIT lisanslı:",{"type":17,"tag":47,"props":689,"children":690},{},[691,703,723,743],{"type":17,"tag":51,"props":692,"children":693},{},[694,701],{"type":17,"tag":91,"props":695,"children":698},{"href":696,"rel":697},"https://github.com/halitsever/logmoji",[248],[699],{"type":22,"value":700},"logmoji",{"type":22,"value":702},": her satırı bir emoji, log seviyesi, renk ve zaman damgasıyla yazan küçük bir logger.",{"type":17,"tag":51,"props":704,"children":705},{},[706,713,715,721],{"type":17,"tag":91,"props":707,"children":710},{"href":708,"rel":709},"https://github.com/halitsever/random-memes",[248],[711],{"type":22,"value":712},"random-memes",{"type":22,"value":714},": Lemmy topluluklarından rastgele meme getiren bir kütüphane ve CLI. Bağımlılığı yok, Node.js'in kendi ",{"type":17,"tag":67,"props":716,"children":718},{"className":717},[],[719],{"type":22,"value":720},"fetch",{"type":22,"value":722},"'ini kullanıyor, Node.js 20 veya üstü istiyor.",{"type":17,"tag":51,"props":724,"children":725},{},[726,733,735,741],{"type":17,"tag":91,"props":727,"children":730},{"href":728,"rel":729},"https://github.com/halitsever/shotsnap",[248],[731],{"type":22,"value":732},"shotsnap",{"type":22,"value":734},": bir URL'in ekran görüntüsünü bulutta çalışan bir tarayıcı üzerinden alıp PNG olarak ",{"type":17,"tag":67,"props":736,"children":738},{"className":737},[],[739],{"type":22,"value":740},"Buffer",{"type":22,"value":742}," döndüren bir kütüphane. Puppeteer ya da Chrome kurmanız gerekmiyor.",{"type":17,"tag":51,"props":744,"children":745},{},[746,753],{"type":17,"tag":91,"props":747,"children":750},{"href":748,"rel":749},"https://github.com/halitsever/temp-mail-plus-api",[248],[751],{"type":22,"value":752},"temp-mail-plus-api",{"type":22,"value":754},": Temp Mail Plus için resmi olmayan bir Node.js ve TypeScript istemcisi. Geçici e-posta adresi oluşturup gelen kutusunu okuyor.",{"type":17,"tag":18,"props":756,"children":757},{},[758,760,765],{"type":22,"value":759},"Küçük bir kütüphane yazıp npm'e yayınlamak Node.js'i öğrenmenin iyi bir yolu. ",{"type":17,"tag":67,"props":761,"children":763},{"className":762},[],[764],{"type":22,"value":310},{"type":22,"value":766},", modül sistemi, sürümleme ve başkalarının kodunuzu nasıl kullandığı konusunda tek bir projeden çok şey öğreniyorsunuz.",{"type":17,"tag":30,"props":768,"children":770},{"id":769},"sık-sorulan-sorular",[771],{"type":22,"value":772},"Sık sorulan sorular",{"type":17,"tag":774,"props":775,"children":777},"h3",{"id":776},"nodejs-frontend-mi-backend-mi",[778],{"type":22,"value":779},"Node.js frontend mi backend mi?",{"type":17,"tag":18,"props":781,"children":782},{},[783],{"type":22,"value":784},"Node.js backend tarafında çalışıyor. Frontend projelerinde de build araçlarını çalıştırmak için kullanılıyor, ama kullanıcının tarayıcısında çalışan kod Node.js değil.",{"type":17,"tag":774,"props":786,"children":788},{"id":787},"nodejs-öğrenmek-için-önce-javascript-bilmek-gerekir-mi",[789],{"type":22,"value":790},"Node.js öğrenmek için önce JavaScript bilmek gerekir mi?",{"type":17,"tag":18,"props":792,"children":793},{},[794,796,802,803,808],{"type":22,"value":795},"Evet. Değişkenler, fonksiyonlar, nesneler, ",{"type":17,"tag":67,"props":797,"children":799},{"className":798},[],[800],{"type":22,"value":801},"Promise",{"type":22,"value":117},{"type":17,"tag":67,"props":804,"children":806},{"className":805},[],[807],{"type":22,"value":217},{"type":22,"value":809}," konularını bilmeden Node.js'e geçmek işleri zorlaştırıyor. Özellikle asenkron kodu anlamadan event loop'u anlamak zor.",{"type":17,"tag":774,"props":811,"children":813},{"id":812},"hangi-nodejs-sürümünü-kullanmalıyım",[814],{"type":22,"value":815},"Hangi Node.js sürümünü kullanmalıyım?",{"type":17,"tag":18,"props":817,"children":818},{},[819],{"type":22,"value":820},"Production için güncel LTS sürümlerinden birini. Bugün bunlar 26, 24 ve 22. Yeni bir projeye başlıyorsanız en yeni LTS ile başlayın.",{"type":17,"tag":774,"props":822,"children":824},{"id":823},"nodejs-mi-express-mi-nestjs-mi",[825],{"type":22,"value":826},"Node.js mi, Express mi, NestJS mi?",{"type":17,"tag":18,"props":828,"children":829},{},[830],{"type":22,"value":831},"Bunlar birbirinin alternatifi değil. Express ve NestJS, Node.js üzerinde çalışan framework'ler. Küçük bir API için Express yetiyor, büyük ve çok kişili bir proje için NestJS'in yapısı işinizi kolaylaştırıyor.",{"type":17,"tag":774,"props":833,"children":835},{"id":834},"nodejs-ile-yazılmış-bir-projeyi-nasıl-deploy-ederim",[836],{"type":22,"value":837},"Node.js ile yazılmış bir projeyi nasıl deploy ederim?",{"type":17,"tag":18,"props":839,"children":840},{},[841,843,849,851,857],{"type":22,"value":842},"En yaygın yol uygulamayı bir container image'ına koyup sunucuda çalıştırmak. Nasıl yapıldığını ",{"type":17,"tag":91,"props":844,"children":846},{"href":845},"/posts/docker-nedir",[847],{"type":22,"value":848},"Docker nedir",{"type":22,"value":850}," yazısında bir Dockerfile örneğiyle anlattım. Projeniz için bir backend geliştiriciye ihtiyacınız varsa ",{"type":17,"tag":91,"props":852,"children":854},{"href":853},"/tr/freelance-yazilimci",[855],{"type":22,"value":856},"freelance çalıştığım işlere",{"type":22,"value":858}," bakabilirsiniz.",{"title":7,"searchDepth":860,"depth":860,"links":861},2,[862,863,864,865,866,867,868,869,870,871],{"id":32,"depth":860,"text":35},{"id":101,"depth":860,"text":104},{"id":156,"depth":860,"text":159},{"id":235,"depth":860,"text":238},{"id":277,"depth":860,"text":280},{"id":396,"depth":860,"text":399},{"id":501,"depth":860,"text":504},{"id":558,"depth":860,"text":561},{"id":679,"depth":860,"text":682},{"id":769,"depth":860,"text":772,"children":872},[873,875,876,877,878],{"id":776,"depth":874,"text":779},3,{"id":787,"depth":874,"text":790},{"id":812,"depth":874,"text":815},{"id":823,"depth":874,"text":826},{"id":834,"depth":874,"text":837},"markdown","content:posts:node-js-nedir.md","content","posts/node-js-nedir.md","md",{"loc":4},[886,889,892,896,900,904,908,911,915,919,923,927,931,935,939,942,946,950,954,958,962,966,971,975,979],{"_path":93,"title":887,"description":888,"lang":12},"API nedir? REST API, HTTP istekleri ve durum kodları","API nedir, ne işe yarar? curl ile gerçek bir API isteği, REST API nedir, HTTP metodları, durum kodları ve API'lerde kimlik doğrulama, sade bir dille.",{"_path":671,"title":890,"description":891,"lang":12},"Backend nedir, backend developer ne iş yapar? Frontend ile farkı","Backend nedir, backend developer ne iş yapar? Sunucu, API ve veritabanı tarafını, frontend ile farkını ve küçük bir NestJS örneğini anlatıyorum.",{"_path":893,"title":894,"description":895,"lang":12},"/posts/bursa-gunubirlik-gezi-mudanya-koza-han-golyazi","Bursa günübirlik gezi: Mudanya, Koza Han, İskender ve Gölyazı","İstanbul'dan Bursa'ya günübirlik gezi: Mudanya'da kahvaltı, Koza Han, Mavi Dükkan'da Bursa iskender ve Gölyazı'daki 725 yıllık Ağlayan Çınar.",{"_path":897,"title":898,"description":899},"/posts/claude-code-headless","Claude Code headless mode: claude -p in scripts and CI","How Claude Code headless mode works: claude -p, text and JSON output, permission flags, bare mode, auth tokens and running it in scripts and GitHub Actions.",{"_path":901,"title":902,"description":903,"lang":12},"/posts/claude-code-nedir","Claude Code nedir, nasıl kurulur ve kullanılır?","Claude Code nedir? Anthropic'in kodlama aracının kurulumu, giriş, temel komutlar, CLAUDE.md, izin modları ve sunucuda paralel kullanımı, örneklerle.",{"_path":905,"title":906,"description":907},"/posts/claude-code-skills","Claude Code skills: what they are and how to write one","Claude Code skills explained: SKILL.md and its frontmatter, where skills live, how they trigger, and how to write one step by step, with a real example.",{"_path":845,"title":909,"description":910,"lang":12},"Docker nedir? Image, container, kurulum ve Docker Compose","Docker nedir, ne işe yarar? Image, container, volume ve network kavramları, Ubuntu'ya Docker kurulumu ve küçük bir docker-compose.yml örneği.",{"_path":912,"title":913,"description":914,"lang":12},"/posts/full-stack-developer-nedir","Full stack developer nedir, ne iş yapar, nasıl olunur?","Full stack developer nedir, ne iş yapar? Frontend, backend, veritabanı ve deploy katmanları, gerçek bir stack, 2026 maaş verisi ve nasıl olunacağı.",{"_path":916,"title":917,"description":918,"lang":12},"/posts/istanbul-yazilim-sirketleri","İstanbul yazılım şirketleri: nasıl seçilir ve kimler var? (2026)","İstanbul yazılım şirketleri arasında nasıl seçim yapılır? Sorulacak sorular, sözleşme ve kod sahipliği, uyarı işaretleri ve bilinen şirketlerden bir liste.",{"_path":920,"title":921,"description":922},"/posts/nestjs-vs-express","NestJS vs Express: the same endpoint in both, and when to pick which","NestJS vs Express from a NestJS developer: the same API in both, testing, performance numbers from the official docs, and when to pick each.",{"_path":924,"title":925,"description":926},"/posts/nuxt-seo","Nuxt SEO: the setup I use on this site, with the real config","A practical Nuxt SEO guide from halit.org: sitemap, robots, schema.org, useSeoMeta, real 404s, prerendering, hreflang and the nofollow default in Nuxt Content.",{"_path":928,"title":929,"description":930},"/posts/nuxt-vs-next","Nuxt vs Next: an honest comparison from someone who ships Nuxt","Nuxt vs Next compared on Nuxt 4.6 and Next.js 16: rendering modes, routing, data fetching, ecosystem and deployment, with code for the same page in both.",{"_path":932,"title":933,"description":934,"lang":12},"/posts/prometheus-grafana-nedir","Prometheus nedir, Grafana nedir? node_exporter ile sunucu izleme","Prometheus nedir, Grafana nedir ve birlikte nasıl çalışırlar? Metrikler, exporter'lar, node_exporter, PromQL örnekleri ve Docker Compose ile kurulum.",{"_path":936,"title":937,"description":938},"/posts/teleparty-alternative","Teleparty alternative: free ways to watch together online","Looking for a Teleparty alternative? An honest look at Watchbear, Discord Watch Together and Watch2Gether for watching YouTube and Netflix with friends.",{"_path":550,"title":940,"description":941,"lang":12},"TypeScript nedir? JavaScript'e ne ekler, tsconfig nasıl ayarlanır?","TypeScript nedir, JavaScript'ten farkı ne? Tipler, union, generic ve narrowing örnekleri, tsconfig.json'un temel ayarları ve Node.js ile kullanımı.",{"_path":943,"title":944,"description":945,"lang":12},"/posts/yazilimci-maaslari-2026","Yazılımcı maaşları 2026: kıdem, pozisyon, şehir ve çalışma düzenine göre","Yazılımcı maaşları 2026: 5.002 kişilik anketin ham verisinden hesapladığım junior, middle, senior, pozisyon, şehir ve remote maaş ortancaları.",{"_path":947,"title":948,"description":949,"lang":12},"/posts/yazilimci-nasil-olunur","Yazılımcı nasıl olunur? Yazılım öğrenmek için pratik bir yol","Yazılımcı nasıl olunur, yazılım öğrenmeye nereden başlanır? 2012'de forumlarla başlayıp 2020'den beri profesyonel çalışan bir yazılımcının pratik planı.",{"_path":951,"title":952,"description":953},"/posts/running-claude-code-on-a-server-in-parallel","How I run multiple Claude Code agents in parallel on a server","My Claude Code setup: an Ubuntu server set up with claude-code-vps, parallel agents in a tmux grid with claudegrid, and the HaltOS desktop on top.",{"_path":955,"title":956,"description":957},"/posts/small-web-tools-json-to-excel-steam-deck-watchbear","Small web tools I made: JSON to Excel, Steam Deck web apps, Watchbear","A JSON to Excel converter, a generator that puts any website in Steam Deck Game Mode, and Watchbear for watching videos in sync with friends.",{"_path":959,"title":960,"description":961,"lang":12},"/posts/udf-dosyasi-nasil-acilir-pdf-word-cevirme","UDF dosyası nasıl açılır, PDF'ye ve Word'e nasıl çevrilir?","UYAP'ın UDF dosyasını program kurmadan tarayıcıda açmak, PDF'ye ve Word'e çevirmek, Word ve PDF'den UDF hazırlamak. Her aracın neyi koruyup neyi kaybettiğiyle birlikte.",{"_path":963,"title":964,"description":965},"/posts/i-built-a-free-chrome-extension-to-watch-any-video-in-sync-with-friends","I built a free Chrome extension to watch any video in sync with friends","Watchbear is my free Chrome extension to watch YouTube together with friends: start a room, share the link, and play, pause and seek stay in sync.",{"_path":967,"title":968,"description":969,"lang":970},"/posts/a-short-trip-to-bursa","A day trip to Bursa: Mudanya, Koza Han, Iskender and Gölyazı","A day trip to Bursa via the Osmangazi Bridge, breakfast in Mudanya, Koza Han, Mavi Dükkan Iskender, and a peaceful visit to Gölyazı.","en",{"_path":972,"title":973,"description":974},"/posts/embedding-metabase-dashboard-on-nuxt-app","Embedding a Metabase dashboard in a Nuxt 3 app","Metabase embedding in Nuxt 3: sign the embed JWT in a server route, lock parameters per user, set token expiry and theme the embedded dashboard.",{"_path":976,"title":977,"description":978},"/posts/grafana-deep-dive","Grafana Docker Compose setup with Prometheus and node_exporter","Monitor a server with Grafana in Docker: a docker-compose.yml for Grafana, Prometheus and node_exporter, the scrape config, and a ready-made dashboard.",{"_path":493,"title":980,"description":981},"Deploying an Express.js application on Vercel","How to deploy an Express app on Vercel: the zero-config way, the older vercel.json setup, environment variables, logs and serverless limits.",null,1795295807086]