githubEdit

water-arrow-upDigitalOcean App

Deploy a modern, cloud-native BoxLang application to DigitalOcean App Platform in minutes!

πŸ₯Š BoxLang Starter for DigitalOcean

Deploy a modern, cloud-native BoxLang application to DigitalOcean App Platform in minutes!

This starter kit provides everything you need to run a production-ready BoxLang application on DigitalOcean's App Platformarrow-up-right. Built with the powerful BoxLang MiniServer, this template showcases BoxLang's modern language features, beautiful UI components, and seamless cloud deployment workflow.

✨ What You Get:

  • πŸš€ Pre-configured BoxLang MiniServer with optimal settings

  • 🎨 Beautiful, responsive landing page with Phosphor icons

  • 🐳 Multi-stage Docker build for efficient deployments

  • ⚑ Auto-compile and hot-reload in development

  • πŸ”„ Automatic redeployment on code changes (when forked)

  • πŸ“¦ Ready for DigitalOcean App Platform one-click deployment

⚠️ Note: Following these steps may result in charges for the use of DigitalOcean services.

πŸ“‹ Requirements

  • A DigitalOcean account. If you don't have one, sign up herearrow-up-right.

  • (Optional) A GitHub account to fork this repository for automatic deployments.

πŸš€ Deploy the App

Click the button below to deploy this app to DigitalOcean App Platform. If you're not logged in, you'll be prompted to authenticate.

Deploy to DigitalOceanarrow-up-right

The one-click deploy button above deploys directly from our template repository, which means you won't get automatic redeployments when you make changes. We recommend forking this repository to your own GitHub account first.

To fork this repository:

  1. Click the Fork button in the top-right corner

  2. Follow the on-screen instructions (Learn more about forkingarrow-up-right)

To deploy your forked repository:

  1. Click Create App

  2. Under Service Provider, select GitHub

  3. Under Repository, select your forked repo (e.g., <your-username>/boxlang-starter-digitalocean)

  4. Ensure Branch is set to main and Autodeploy is checked βœ…

  5. Click Next

βš™οΈ Configuration Steps

After clicking the deploy button or connecting your forked repository:

  1. Configure your app (Optional)

    • Add environment variables

    • Configure HTTP routes

    • Add databases or other services

    • For this starter, default settings work perfectly!

  2. Name and Region

    • Provide a name for your app

    • Select your preferred deployment region

    • App Platform automatically selects the closest region

    • All apps are routed through a global CDN for optimal performance 🌍

  3. Review Settings

    • Leave default fields as-is

    • Click Next

  4. Launch Your App πŸŽ‰

    • Review your plan (Basic/Pro)

    • Confirm the number of containers

    • Click Launch Basic/Pro App

πŸ“Š Monitor Your Deployment

After launching, you'll see a "Building..." progress indicator. Click View Logs to watch the build process in real-time.

The build typically takes 2-3 minutes. Once complete:

  • Click the Live App link in the header

  • Your BoxLang application will open in a new tab! 🎊

✏️ Make Changes to Your App

If you forked the repository, you can now customize your BoxLang application:

  1. Make changes to files in your forked repo (e.g., edit /app/index.bxm)

  2. Commit and push to the main branch

  3. App Platform automatically redeploys with zero downtime ⚑

No manual steps requiredβ€”just push and watch it deploy!

πŸ“š Learn More

Want to dive deeper into App Platform features?

πŸ—‘οΈ Delete the App

When you're done testing or no longer need this application:

  1. Select your app

  2. Go to the Settings tab

  3. Click Destroy

  4. Confirm the deletion

⚠️ Important: If you don't delete your app, charges for DigitalOcean services will continue to accrue.

πŸ₯Š BoxLang MiniServer App

This starter uses the BoxLang MiniServerβ€”a lightweight, embedded web server perfect for containerized deployments and rapid development.

What's Included

πŸ“¦ Application Structure:

βš™οΈ MiniServer Configuration:

  • Port: 8080 (production), 9090 (local development)

  • Host: 0.0.0.0 (container), 127.0.0.1 (local)

  • Web Root: ./app directory

  • Auto-compile: Enabled for BoxLang files

  • Health Check: Built-in health endpoint

  • URL Rewrites: Enabled with fallback to index.bxm

πŸƒ Running Locally

Want to test your BoxLang app on your local machine? Here's how:

Prerequisites

Option 1: Run with Docker (Recommended)

Hot Reload Development Mode:

Option 2: Run with BoxLang CLI

The MiniServer will automatically read miniserver.json and start with all configured settings.

πŸ”§ Customization Tips

Update the Port:

Edit miniserver.json to change the default port:

Environment Variables:

Set environment-specific configurations in boxlang.json:

Add BoxLang Modules:

Install community modules using the BoxLang CLI:

πŸ“– Additional Resources


πŸ’¬ Need Help?

Happy Coding with BoxLang! πŸ₯Š

Last updated

Was this helpful?