Your POS system is now configured for LAN access!
From any device on your network:
- Frontend (Angular App):
http://192.168.160.1:4200 - Backend API:
http://192.168.160.1:3001/api - Product Images:
http://192.168.160.1:3001/product_images
From the host machine:
- Frontend:
http://localhost:4200 - Backend API:
http://localhost:3001/api
- Port: 3001
- Binding: 0.0.0.0 (all network interfaces)
- Location:
server/index.js
- Port: 4200 (default)
- Configuration:
--host 0.0.0.0 --disable-host-check - Start command:
npm start
- File:
src/environments/environment.ts - API URL:
http://192.168.160.1:3001/api - Image URL:
http://192.168.160.1:3001
cd c:\Users\IRWIN\Documents\pdev\server
node index.jsYou should see:
Server is running on port 3001
Local: http://localhost:3001
LAN: http://192.168.160.1:3001
cd c:\Users\IRWIN\Documents\pdev
npm startYou should see:
** Angular Live Development Server is listening on 0.0.0.0:4200 **
On your phone, tablet, or another computer connected to the same network:
- Open a web browser
- Navigate to:
http://192.168.160.1:4200 - You should see the POS login screen
Run this command in PowerShell as Administrator:
# Allow inbound connections on port 3001 (Node.js)
New-NetFirewallRule -DisplayName "Node.js Server (Port 3001)" -Direction Inbound -LocalPort 3001 -Protocol TCP -Action Allow
# Allow inbound connections on port 4200 (Angular)
New-NetFirewallRule -DisplayName "Angular Dev Server (Port 4200)" -Direction Inbound -LocalPort 4200 -Protocol TCP -Action AllowOr manually:
- Open Windows Defender Firewall with Advanced Security
- Click Inbound Rules
- Click New Rule...
- Select Port, click Next
- Select TCP, enter 3001 and 4200 (comma-separated)
- Select Allow the connection
- Check all profiles (Domain, Private, Public)
- Name it "POS System Ports"
- Click Finish
Your IP might have changed. Get your current IP:
(Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" -and $_.IPAddress -notlike "169.254.*" } | Select-Object -First 1).IPAddressIf it's different from 192.168.160.1, update:
src/environments/environment.tsserver/index.js(startup message)
Make sure both devices are on the same network:
- Same WiFi network
- Same subnet (usually 192.168.x.x)
From another device, try pinging the server:
ping 192.168.160.1From the host machine:
# Check if Node.js is listening on port 3001
netstat -ano | findstr :3001
# Check if Angular is listening on port 4200
netstat -ano | findstr :4200- Current setup is perfect for local network testing
--disable-host-checkallows any hostname to access the dev server
When deploying to production:
- Remove
--disable-host-check - Configure proper CORS in
server/index.js - Use environment-specific configs
- Enable HTTPS
- Add authentication middleware
- Use a reverse proxy (nginx/Apache)
- Set proper firewall rules
┌─────────────────────────────────────────┐
│ Your Local Network (192.168.160.x) │
│ │
│ ┌────────────────────────────────────┐ │
│ │ Host PC (192.168.160.1) │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐│ │
│ │ │ Node.js │ │ Angular ││ │
│ │ │ Port: 3001 │ │ Port: 4200 ││ │
│ │ │ (Backend) │ │ (Frontend) ││ │
│ │ └─────────────┘ └─────────────┘│ │
│ └────────────────────────────────────┘ │
│ ▲ │
│ │ │
│ ┌────────┴───────┐ ┌───────────────┐│
│ │ Phone/Tablet │ │ Other PC ││
│ │ Access via │ │ Access via ││
│ │ 192.168.160.1 │ │ 192.168.160.1││
│ └────────────────┘ └───────────────┘│
└─────────────────────────────────────────┘
# Terminal 1 - Backend
cd c:\Users\IRWIN\Documents\pdev\server
node index.js
# Terminal 2 - Frontend
cd c:\Users\IRWIN\Documents\pdev
npm startcd c:\Users\IRWIN\Documents\pdev
npm run devipconfig | findstr IPv4# Test health endpoint
curl http://192.168.160.1:3001/api/health
# Test from another device
curl http://192.168.160.1:3001/api/products- Use Chrome or Safari - Best compatibility
- Add to Home Screen - For app-like experience
- Enable Landscape Mode - Optimal for POS interface
- Disable Auto-Lock - Keep screen active during operation
If using a Bluetooth barcode scanner:
- Pair the scanner with your device
- The scanner will type into the search field automatically
- Auto-focus ensures the search bar is always ready
- Products will be added to cart instantly
- ✅ Test access from another device
- ✅ Configure firewall rules if needed
- ✅ Set up tablets/phones for POS use
- ⬜ Configure production environment
- ⬜ Set up HTTPS for production
- ⬜ Add user authentication for remote access