Wowonder Image Resizer & Cropper - Documentation

A comprehensive guide to hosting and using the Wowonder Image Resizer HTML Script.

Introduction

Welcome to the documentation for the **Wowonder Image Resizer & Cropper HTML Script**. This is a powerful, client-side web application that runs entirely in your web browser. It does not require a backend server with PHP, Python, or Node.js, making it incredibly easy to deploy. All you need is a way to serve a static HTML file.

How to Host the Script

Choose the method that best suits your needs.

Method 1: Hosting on a Cloud Server (e.g., DigitalOcean, Google Cloud, AWS)

This method is for making the app publicly available on the internet.

  1. Set Up a Web Server: You'll need a Linux-based virtual machine (VPS) with a web server like **Nginx** or **Apache** installed.
    sudo apt update
    sudo apt install nginx -y
  2. Create a Directory: Create a folder for your app's files. A common location is /var/www/html/your-domain/.
  3. Transfer the File: Use an SFTP client (like FileZilla) to upload the index.html file to the directory you created on your server.
  4. Configure Nginx/Apache: Create a server block or virtual host file that points to your app's directory.
    server {
        listen 80;
        server_name your-domain.com www.your-domain.com;
        root /var/www/html/your-domain/;
        index index.html;
        location / {
            try_files $uri $uri/ =404;
        }
    }
  5. Restart the Web Server: Test your configuration and then restart the web server to apply the changes.
    sudo nginx -t
    sudo systemctl restart nginx
    Your app should now be live at http://your-domain.com.

Method 2: Hosting on Shared Hosting (e.g., GoDaddy, HostGator, Bluehost)

This is the simplest way to host if you already have a shared hosting account.

  1. Access the cPanel: Log in to your hosting provider's cPanel or dashboard.
  2. Use the File Manager: Navigate to the File Manager and find the root directory of your domain (usually public_html).
  3. Upload the File: Upload the index.html file directly to the public_html folder using the built-in uploader.
  4. Done: The app will be live immediately at your domain's URL.

Method 3: Hosting on a Local Computer (Windows or Linux)

For running the app on your own machine without a public server.

  1. Install a Local Web Server: The easiest way is to use Node.js's http-server. First, install Node.js and npm.
    npm install -g http-server
  2. Run the Server: In your terminal or command prompt, navigate to the directory containing index.html and run the command:
    http-server
  3. Access the App: The server will start on a local address, typically http://127.0.0.1:8080. Open this URL in your browser.

Method 4: Hosting on Android using Termux

Termux is a terminal emulator for Android that allows you to run a web server directly on your phone.

  1. Install Termux: Download and install Termux from the F-Droid store.
  2. Update Packages: Open Termux and update the package list:
    pkg update && pkg upgrade
  3. Install a Web Server: Install Python and Flask.
    pkg install python
    pip install Flask
  4. Create and Run a Server Script: Create a file named server.py in the same directory as index.html.
    from flask import Flask, send_from_directory
    
    app = Flask(__name__, static_folder='.')
    
    @app.route('/')
    def index():
        return send_from_directory('.', 'index.html')
    
    if __name__ == '__main__':
        app.run(host='0.0.0.0', port=8080)
    Then, start the server:
    python server.py
  5. Access the App: Your app will be accessible at http://127.0.0.1:8080 in your Android browser.