File size: 922 Bytes
f6ba329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# Colors for terminal output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color

echo -e "${YELLOW}Starting local preview server...${NC}"

# Make sure dependencies are installed
echo -e "${YELLOW}Making sure dependencies are installed...${NC}"
npm install

# Ensure banner-fb.jpg is up-to-date
echo -e "${YELLOW}Ensuring Facebook-compatible banner image is up-to-date...${NC}"
if [ -f "convert-banner.sh" ]; then
    chmod +x convert-banner.sh
    ./convert-banner.sh
fi

# Start the local development server using locally installed Wrangler
echo -e "${YELLOW}Starting Wrangler development server...${NC}"
echo -e "${GREEN}Your site will be available at http://localhost:8788${NC}"
echo -e "${YELLOW}Press Ctrl+C to stop the server${NC}"

# Run wrangler dev with the --local flag to use local assets
npx wrangler dev --local

# This will keep running until the user presses Ctrl+C