Skip to content

Latest commit

 

History

History
295 lines (204 loc) · 7.52 KB

File metadata and controls

295 lines (204 loc) · 7.52 KB

Deploy to 23blocks Platform - Zero Friction Deployment

The fastest way to deploy your landing page: One command. Zero hassle.

Why 23blocks Platform?

Forget creating accounts on multiple platforms, configuring build settings, or dealing with complex deployment pipelines. With 23blocks, you deploy in seconds:

  1. Run npm run deploy
  2. Enter your credentials
  3. Get your live URL: username.project.23blocks.com

That's it. 200% less friction.

Prerequisites

  1. 23blocks Account: Create a free account at 23blocks.com
  2. API Key: Get your API key from your dashboard (you'll need this later)
  3. Built Project: Make sure you've run npm run build at least once

Quick Start

1. Build Your Landing Page

npm run build

This creates the optimized dist folder with your production-ready site.

2. Deploy in One Command

npm run deploy

3. Follow the Prompts

On first run, you'll be asked:

Enter your 23blocks API URL [https://api.23blocks.com]:

Just press Enter to use the default, or enter your custom API endpoint.

Then authenticate:

Username: yourusername
Password: ********

Your credentials are used to generate a secure JWT token (valid for 1 hour). We never store your password.

Optionally, give your project a name:

Project name (optional): my-awesome-landing

4. Watch the Magic

The CLI will:

  • ✓ Verify your dist folder
  • ✓ Authenticate with 23blocks
  • ✓ Package your files (HTML, CSS, JS, images)
  • ✓ Upload to 23blocks platform
  • ✓ Create an S3 bucket configured as a static website
  • ✓ Return your live URL

5. Success!

═══════════════════════════════════════════════════
  🎉 Deployment Successful!
═══════════════════════════════════════════════════

Your site is live at:
  https://username.project.23blocks.com

Copy the URL and share it with the world!

How It Works

Behind the Scenes

  1. Authentication: You provide username/password → Platform returns JWT token (1-hour validity)
  2. Packaging: CLI zips your dist folder (only web-safe files: HTML, CSS, JS, images)
  3. Upload: Files sent to 23blocks API with your JWT token
  4. Validation: Platform verifies files (blocks executables and unsafe content)
  5. Deployment: Platform creates an S3 bucket, configures it as a static website
  6. DNS: Platform sets up subdomain routing
  7. Live: You get username.project.23blocks.com

Security

  • No stored passwords: Credentials are only used to get a JWT token
  • File validation: Platform blocks executables, scripts, and dangerous files
  • Secure transport: All communication over HTTPS
  • Token expiry: JWT tokens expire after 1 hour for security
  • Config file: API URL saved locally in .23blocks.config.json (gitignored)

Configuration

First-Time Setup

When you run npm run deploy for the first time, the CLI creates .23blocks.config.json:

{
  "apiBase": "https://api.23blocks.com"
}

This file is automatically added to .gitignore so it won't be committed.

Custom API Endpoint

If you're using a custom 23blocks instance or testing locally:

# The CLI will ask on first run, or you can edit .23blocks.config.json
{
  "apiBase": "https://my-custom-api.example.com"
}

Re-deployment

Already deployed? Just run npm run deploy again:

  • Same project name → Updates existing deployment
  • Different project name → Creates new deployment
  • All old deployments remain accessible

Troubleshooting

"dist folder not found"

Solution: Run npm run build first to create the production build.

npm run build
npm run deploy

"Authentication failed"

Possible causes:

  1. Wrong username or password
  2. Account not activated
  3. API endpoint unreachable

Solution:

  • Double-check your credentials
  • Verify your account is active on 23blocks.com
  • Check your internet connection

"Upload failed: 413"

Cause: Your site is too large (over the upload limit)

Solution:

  • Optimize images (use compressed formats)
  • Remove unused assets
  • Contact support for enterprise limits

"ECONNREFUSED"

Cause: Can't connect to 23blocks API

Solution:

  • Check internet connection
  • Verify API URL in .23blocks.config.json
  • Check if platform is down: status.23blocks.com

Advanced Usage

Multiple Projects

Want to deploy multiple landing pages? No problem:

# Project 1
npm run build
npm run deploy
# Project name: landing-page-1

# Project 2
npm run build
npm run deploy
# Project name: landing-page-2

Each gets its own URL:

  • username.landing-page-1.23blocks.com
  • username.landing-page-2.23blocks.com

Custom Domains

Want to use your own domain? Contact 23blocks support to configure:

  • www.yourdomain.comusername.project.23blocks.com
  • SSL certificates included automatically

CI/CD Integration

Automate deployments in your CI/CD pipeline:

# GitHub Actions, GitLab CI, etc.
npm run build
# Use environment variables for credentials
echo "$DEPLOY_USERNAME" | npm run deploy

Comparison with Other Platforms

Feature 23blocks Vercel Netlify AWS Amplify
Setup Time 30 seconds 5 minutes 5 minutes 10 minutes
Commands 1 3+ 3+ 5+
Account Required Yes Yes Yes Yes
GitHub Required No Optional Optional Optional
Config Files None vercel.json netlify.toml amplify.yml
Free Tier Yes Yes Yes 12 months
Custom Domain Yes Yes Yes Yes

23blocks advantage: No config files, no GitHub connection needed, one command deployment.

Cost

23blocks platform offers:

  • Free Tier: Perfect for testing ideas
  • Pro Tier: More storage and bandwidth
  • Enterprise: Custom domains, SLA, priority support

Check 23blocks.com/pricing for current rates.

Support

Having issues? We're here to help:

What Makes This Different?

Traditional Deployment (Vercel, Netlify, etc.)

  1. Create account on platform
  2. Connect GitHub repo
  3. Configure build settings
  4. Set environment variables
  5. Wait for build
  6. Check logs
  7. Debug issues
  8. Deploy

Time: 15-30 minutes per platform

23blocks Deployment

  1. Run npm run deploy
  2. Enter credentials
  3. Done

Time: 30 seconds

That's 200% less friction. 🚀

Roadmap

Coming soon:

  • Environment variables support
  • Automatic SSL for custom domains
  • Preview deployments
  • Rollback to previous versions
  • Analytics dashboard
  • Team collaboration

License

This deployment CLI is part of The Landing Page project and is licensed under the MIT License.


Ready to deploy?

npm run deploy

Welcome to zero-friction deployment. 🎉