2.5 KiB
2.5 KiB
⚡ INÍCIO RÁPIDO - AÇO CALC PRO
🚨 ERRO CORS? LEIA ISTO!
Se você viu este erro:
Access to fetch at 'file:///' has been blocked by CORS policy
Você está abrindo o arquivo HTML diretamente!
❌ ERRADO: Duplo clique em index.html
✅ CORRETO: Usar servidor web local
🎯 SOLUÇÃO EM 3 PASSOS
1️⃣ Abrir Terminal/PowerShell
Windows:
- Pressione
Win + R - Digite
powershell - Pressione Enter
Ou:
- Clique com botão direito na pasta
- Selecione "Abrir no Terminal"
2️⃣ Executar Comando
Cole um destes comandos:
# Python (Recomendado)
python -m http.server 8000
# Ou Node.js
npx http-server -p 8000
# Ou PHP
php -S localhost:8000
3️⃣ Abrir no Navegador
Acesse: http://localhost:8000
🎯 MÉTODO AINDA MAIS FÁCIL (Windows)
- Duplo clique em
server.bat - Aguarde janela abrir
- Acesse: http://localhost:8000
✅ VERIFICAR SE FUNCIONOU
- Abra http://localhost:8000
- Vá para: MATERIAIS → Catálogo de Perfis → Cantoneiras
- Clique: "🔄 Carregar Dados"
- Veja: 39 cantoneiras devem aparecer
- Console (F12): Sem erros CORS
🐛 AINDA NÃO FUNCIONA?
Python não instalado?
Instale Python:
- Acesse: https://www.python.org/downloads/
- Baixe Python 3.x
- IMPORTANTE: Marque "Add Python to PATH"
- Instale
- Reinicie terminal
- Tente novamente
Porta 8000 ocupada?
Use outra porta:
python -m http.server 8001
Acesse: http://localhost:8001
Nada funciona?
Use Live Server (VS Code):
- Instale VS Code
- Instale extensão "Live Server"
- Abra pasta no VS Code
- Clique direito em
index.html - Selecione "Open with Live Server"
🚀 PARA PRODUÇÃO
Quando estiver pronto para publicar:
# Vercel
npm install -g vercel
vercel --prod
# Netlify
npm install -g netlify-cli
netlify deploy --prod
📚 MAIS INFORMAÇÕES
INICIAR-SERVIDOR.md- Guia completo de servidoresGUIA-DEPLOY.md- Como fazer deployREADME.md- Documentação completa
🎯 RESUMO
- ❌ NÃO abra
index.htmldiretamente - ✅ USE servidor web local
- ✅ ACESSE http://localhost:8000
- ✅ TESTE carregamento de cantoneiras
- ✅ FAÇA deploy quando pronto
Inicie o servidor e divirta-se! 🚀