Setup Steps
1. Install Netlify CLI:
npm install -g netlify-cli2. Login:
netlify login3. Create a new site:
netlify init4. Manual deploy:
netlify deploy --dir=dist5. Production deploy:
netlify deploy --prod --dir=dist6. Git integration:
- Connect your GitHub repo at https://app.netlify.com
- Set build command and publish directory
7. netlify.toml configuration:
[build]
command = "npm run build"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 2008. Environment variables: Site Settings > Build & Deploy > Environment
9. Custom 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("Hello!")
}Related Guides
Deploy to Vercel
Deploy your Next.js or React project to the Vercel platform.
Bun Runtime Setup
Install the Bun JavaScript/TypeScript runtime. A fast alternative to Node.js.
Deno Setup
Install the Deno JavaScript/TypeScript runtime. A secure and modern alternative.
Rust and Cargo Setup
Install the Rust programming language and Cargo package manager.