Dev.to WebDev 🛠 Dev 👁 0 📖 4 min read

How to Monitor Your SolidStart Application with Vigilmon

How to Monitor Your SolidStart Application with Vigilmon SolidStart is the official meta-framework for Solid.js, offering file-based routing, server-side rendering, API routes, and edge deployment support. As SolidStar

How to Monitor Your SolidStart Application with Vigilmon

SolidStart is the official meta-framework for Solid.js, offering file-based routing, server-side rendering, API routes, and edge deployment support. As SolidStart moves toward stable releases and sees broader production adoption, teams need reliable monitoring for their SolidStart apps. This guide walks through setting up uptime monitoring, health checks, and alerting with Vigilmon.

What to Monitor in a SolidStart App

SolidStart applications typically have several monitoring targets:

  1. The main SSR route - your homepage or primary user-facing route
  2. API routes - SolidStart's server functions and API endpoints
  3. SSL certificate - critical for custom domains
  4. Edge function health - if you're deploying to Cloudflare Workers or similar

Quick Setup: Monitor Your SolidStart App

The simplest starting point is monitoring your production URL:

  1. Go to vigilmon.online and create a free account
  2. Click New Monitor ? HTTP
  3. Enter your SolidStart production URL
  4. Set expected status: 200
  5. Enable email alerts

This catches the most common failures: server crashes, deployment failures, and DNS issues.

Adding a Health Endpoint to SolidStart

SolidStart's file-based routing makes adding a dedicated health endpoint simple. Create a new API route:

// src/routes/api/health.ts
import { APIEvent } from "@solidjs/start/server"

export async function GET(event: APIEvent) {
  return new Response(
    JSON.stringify({ 
      status: "ok",
      timestamp: new Date().toISOString(),
      service: "solidstart-app"
    }),
    { 
      status: 200,
      headers: { "Content-Type": "application/json" }
    }
  )
}

This creates an endpoint at /api/health. In Vigilmon, add a monitor for:

https://your-app.com/api/health

With keyword check "status":"ok" to confirm the response is valid, not just a cached 200.

Health Check with Database Validation

If your SolidStart app uses a database, add a database connectivity check to your health endpoint:

// src/routes/api/health.ts
import { APIEvent } from "@solidjs/start/server"
import { db } from "~/lib/db"

export async function GET(event: APIEvent) {
  try {
    // Test DB connection with a lightweight query
    await db.execute("SELECT 1")

    return new Response(
      JSON.stringify({ status: "ok", db: "connected" }),
      { status: 200, headers: { "Content-Type": "application/json" } }
    )
  } catch (error) {
    return new Response(
      JSON.stringify({ status: "error", db: "disconnected" }),
      { status: 503, headers: { "Content-Type": "application/json" } }
    )
  }
}

Vigilmon will alert you immediately if your database connectivity drops - before your users start seeing errors.

Monitoring Server Functions

SolidStart's server functions ("use server") are one of its key features. You can't monitor them directly with an HTTP check, but you can monitor the routes that use them.

If you have a server function that loads critical data for a route:

// src/routes/dashboard.tsx
import { createResource } from "solid-js"
import { getUser } from "~/server/user"

export default function Dashboard() {
  const [user] = createResource(getUser)
  // ...
}

Monitor the /dashboard route with an expected response that includes content only present when server functions work correctly. Use Vigilmon's keyword check to verify the route returns expected content.

Deployment Platform Considerations

SolidStart on Netlify

SolidStart deploys to Netlify as serverless functions. Monitor your Netlify domain or custom domain. Cold starts can cause occasional latency spikes - set your Vigilmon check interval to 1 minute to avoid alerting on cold starts.

SolidStart on Cloudflare Pages

When deployed to Cloudflare Pages with edge functions, SolidStart runs globally. Vigilmon's multi-region monitoring verifies your app is up across regions. A Cloudflare outage in one region while others are healthy will show up differently in regional checks.

SolidStart on Vercel

Similar to Netlify - monitor your Vercel URL. Consider adding custom headers in Vigilmon's monitor config to pass past any edge middleware that might interfere with health checks.

SolidStart on a Node.js Server

If you're deploying SolidStart's Node.js adapter with a process manager like PM2:

# In your ecosystem.config.js
module.exports = {
  apps: [{
    name: 'solidstart-app',
    script: '.output/server/index.mjs',
    watch: false,
    env: { NODE_ENV: 'production' }
  }]
}

Vigilmon monitors the external URL. If PM2 restarts after a crash, Vigilmon catches the downtime window and alerts you.

SSL Certificate Monitoring

SolidStart apps on custom domains need valid SSL certificates. When you add an HTTPS monitor in Vigilmon, it automatically monitors your cert expiry. You'll receive alerts at 30, 14, and 7 days before expiry - giving you time to renew without an outage.

Setting Up Alerting

Configure alerts in Vigilmon:

Email alert: Immediate notification to your inbox or team email.

Webhook to Slack or Discord:

{
  "text": "?? SolidStart app DOWN: {{monitor_name}} - check https://your-app.com immediately"
}

For team setups, route critical alerts to a dedicated #incidents channel.

Status Page for SolidStart Apps

If your SolidStart app serves end users, create a Vigilmon status page:

  1. In Vigilmon, go to Status Pages ? New
  2. Add your monitors
  3. Share https://status.your-app.com with users

When something goes down, users check the status page instead of flooding your support email.

Monitoring Checklist

  • [ ] Main app URL (homepage or primary route)
  • [ ] /api/health endpoint
  • [ ] SSL certificate expiry
  • [ ] Any critical API routes
  • [ ] Webhook alert to team Slack/Discord

Summary

SolidStart is moving fast and powering more production apps each month. Monitoring it is straightforward: a health endpoint at /api/health plus Vigilmon HTTP monitors covers the critical path.

Monitor URL Check Type
App health /api/health HTTP 200 + keyword
Main route / HTTP 200
SSL cert Your domain Auto-checked on HTTPS

SolidStart's file-based routing makes adding a health endpoint a 5-minute task. The Vigilmon monitor takes 2 minutes to set up. 7 minutes total for production-grade monitoring.

?? Monitor your SolidStart app with Vigilmon - free tier available

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.