Tüm Rehberler

Netlify'a Deploy Etme

Statik site veya JAMstack projenizi Netlify'a deploy edin.

Başlangıç10 dk

Kurulum Adımları

1. Netlify CLI'yi kurun:

npm install -g netlify-cli

2. Giriş yapın:

netlify login

3. Yeni site oluşturun:

netlify init

4. Manuel deploy:

netlify deploy --dir=dist

5. Production deploy:

netlify deploy --prod --dir=dist

6. Git entegrasyonu:

- https://app.netlify.com adresinde GitHub repo'nuzla bağlayın

- Build command ve publish directory ayarlayın

7. netlify.toml yapılandırması:

[build]
  command = "npm run build"
  publish = "dist"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

8. Ortam değişkenleri: Site Settings > Build & Deploy > Environment

9. Özel domain: Domain Settings > Add custom domain

10. Netlify Functions (serverless):

mkdir netlify/functions
# netlify/functions/hello.js
export default async (req, context) => {
  return new Response("Merhaba!")
}