PozoAppCommonUpdatedCode/IIS-QUICK-START.md

130 lines
3.9 KiB
Markdown
Raw Permalink Normal View History

2025-12-05 09:45:16 +05:30
# IIS-ல் App Host செய்ய - Quick Start Guide
## ✅ என்ன செய்யப்பட்டது
1.`dist/web.config` - IIS configuration update செய்யப்பட்டது
2.`dist/package.json` - ES modules support-க்கு create செய்யப்பட்டது
3.`SETUP-IIS.bat` - Automated setup script
4.`COPY-NODE-MODULES-TO-DIST.bat` - node_modules copy script
5.`IIS-DEPLOYMENT-GUIDE.md` - Detailed guide
## 🚀 Quick Start (3 Steps)
### Step 1: Build & Copy Dependencies
```powershell
# Project root-ல்
npm install
npm run build
# node_modules-ஐ dist-க்கு copy செய்யவும்
COPY-NODE-MODULES-TO-DIST.bat
```
### Step 2: IIS Setup (Run as Administrator)
```powershell
SETUP-IIS.bat
```
### Step 3: Test
Browser-ல் open செய்யவும்: `http://localhost`
## 📋 Manual Setup (IIS Manager-ல்)
### 1. IIS Manager Open செய்யவும்
- Windows + R → `inetmgr` → Enter
### 2. Website Create செய்யவும்
- **Connections** → Server name right-click → **Add Website**
- **Site name**: `PozoApp`
- **Physical path**: `D:\2025\Pozo Dev\PozoDev Updated OptimandSEO\Nov 7\dist`
- **Port**: `80` (அல்லது வேறு port)
- **OK** click
### 3. Application Pool Configure
- **Application Pools** → `PozoApp` select
- **Advanced Settings**:
- **.NET CLR Version**: `No Managed Code`
- **Enable 32-Bit Applications**: `False`
### 4. Permissions Setup
- `dist` folder right-click → **Properties****Security**
- **Edit** → **Add**`IIS AppPool\PozoApp`
- **Full Control** select → **OK**
### 5. Start Website
- IIS Manager-ல் website-ஐ right-click → **Start**
## ⚠️ Important Notes
### Prerequisites
- ✅ Node.js 18+ installed
- ✅ iisnode module installed
- ✅ URL Rewrite module installed
- ✅ IIS enabled with required features
### node_modules Required
IIS-ல் Node.js app run செய்ய, `dist` folder-ல் `node_modules` folder தேவை.
`COPY-NODE-MODULES-TO-DIST.bat` run செய்யவும்.
### Port Configuration
Default port 80 use செய்யப்பட்டால், browser-ல் `http://localhost` open செய்யவும்.
Custom port use செய்தால், `http://localhost:PORT` use செய்யவும்.
## 🔍 Troubleshooting
### Error: "iisnode module not found"
```powershell
# iisnode install செய்யவும்
# Download: https://github.com/Azure/iisnode/releases
# Install பிறகு IIS restart
iisreset
```
### Error: "Cannot find module"
```powershell
# node_modules copy செய்யவும்
COPY-NODE-MODULES-TO-DIST.bat
# அல்லது manually
xcopy /E /I /Y "node_modules" "dist\node_modules"
```
### Error: "500 Internal Server Error"
1. IIS Logs check: `C:\inetpub\logs\LogFiles\`
2. iisnode Logs check: `dist\iisnode\`
3. Application Pool identity permissions verify
4. Node.js version verify: `node --version`
### Static Files Load ஆகாமல்
- IIS-ல் **Static Content** feature enable செய்யவும்
- `web.config`-ல் static content rules verify
## 📁 File Structure
```
dist/
├── server.js # Node.js entry point
├── server/ # Server middleware
├── web.config # IIS configuration
├── package.json # ES modules config
├── node_modules/ # Dependencies (copy required)
├── assets/ # Static assets
├── index.html # Main HTML
└── ... # Other files
```
## 🔗 Useful Links
- **iisnode**: https://github.com/Azure/iisnode
- **URL Rewrite**: https://www.iis.net/downloads/microsoft/url-rewrite
- **Node.js**: https://nodejs.org/
## 📞 Support
Detailed guide: `IIS-DEPLOYMENT-GUIDE.md` file-ஐ refer செய்யவும்.
---
**Ready to deploy!** 🚀