2025-12-23 00:23:21 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
import { Button } from '@/components/ui/button';
|
2025-12-23 00:37:37 +00:00
|
|
|
import { ArrowRight, CheckCircle2 } from 'lucide-react';
|
2025-12-23 00:23:21 +00:00
|
|
|
|
|
|
|
|
const QuickStart = () => {
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-8">
|
|
|
|
|
<div className="space-y-4">
|
2025-12-23 00:37:37 +00:00
|
|
|
<h1 className="text-4xl font-bold tracking-tight text-foreground">Quick Start</h1>
|
|
|
|
|
<p className="text-xl text-muted-foreground">
|
|
|
|
|
Get uptime.link running and monitoring your first endpoint in under 5 minutes.
|
2025-12-23 00:23:21 +00:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Prerequisites */}
|
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
<h2 className="text-2xl font-semibold text-foreground">Prerequisites</h2>
|
|
|
|
|
<ul className="space-y-2">
|
|
|
|
|
{['Node.js 18+ or Docker', 'npm or pnpm package manager'].map((item) => (
|
|
|
|
|
<li key={item} className="flex items-center gap-2 text-muted-foreground">
|
|
|
|
|
<CheckCircle2 className="h-4 w-4 text-emerald-500" />
|
|
|
|
|
{item}
|
|
|
|
|
</li>
|
|
|
|
|
))}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Step 1 */}
|
2025-12-23 00:23:21 +00:00
|
|
|
<div className="space-y-4">
|
2025-12-23 00:37:37 +00:00
|
|
|
<h2 className="text-2xl font-semibold text-foreground">1. Install the CLI</h2>
|
2025-12-23 00:23:21 +00:00
|
|
|
<p className="text-muted-foreground">
|
2025-12-23 00:37:37 +00:00
|
|
|
Install the uptime.link CLI globally using npm or pnpm:
|
|
|
|
|
</p>
|
|
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<code className="text-sm text-foreground">npm install -g @uptime.link/cli</code>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-sm text-muted-foreground">
|
|
|
|
|
Or with pnpm:
|
2025-12-23 00:23:21 +00:00
|
|
|
</p>
|
2025-12-23 00:37:37 +00:00
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<code className="text-sm text-foreground">pnpm add -g @uptime.link/cli</code>
|
2025-12-23 00:23:21 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Step 2 */}
|
2025-12-23 00:23:21 +00:00
|
|
|
<div className="space-y-4">
|
2025-12-23 00:37:37 +00:00
|
|
|
<h2 className="text-2xl font-semibold text-foreground">2. Scan Your Network</h2>
|
2025-12-23 00:23:21 +00:00
|
|
|
<p className="text-muted-foreground">
|
2025-12-23 00:37:37 +00:00
|
|
|
Run the detector to discover services on your local network:
|
2025-12-23 00:23:21 +00:00
|
|
|
</p>
|
2025-12-23 00:37:37 +00:00
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<code className="text-sm text-foreground">uptime scan</code>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-sm text-muted-foreground">
|
|
|
|
|
This will scan common ports and detect running services like HTTP servers, databases, and more.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2025-12-23 00:23:21 +00:00
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Step 3 */}
|
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
<h2 className="text-2xl font-semibold text-foreground">3. Add a Monitor</h2>
|
2025-12-23 00:23:21 +00:00
|
|
|
<p className="text-muted-foreground">
|
2025-12-23 00:37:37 +00:00
|
|
|
Add an endpoint to monitor:
|
|
|
|
|
</p>
|
|
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<pre className="text-sm text-foreground overflow-x-auto">{`uptime add https://api.example.com --interval 60`}</pre>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-sm text-muted-foreground">
|
|
|
|
|
This adds the endpoint to your monitoring list with 60-second check intervals.
|
2025-12-23 00:23:21 +00:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Step 4 */}
|
2025-12-23 00:23:21 +00:00
|
|
|
<div className="space-y-4">
|
2025-12-23 00:37:37 +00:00
|
|
|
<h2 className="text-2xl font-semibold text-foreground">4. View Status</h2>
|
2025-12-23 00:23:21 +00:00
|
|
|
<p className="text-muted-foreground">
|
2025-12-23 00:37:37 +00:00
|
|
|
Check the status of all monitored endpoints:
|
2025-12-23 00:23:21 +00:00
|
|
|
</p>
|
2025-12-23 00:37:37 +00:00
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<code className="text-sm text-foreground">uptime status</code>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-sm text-muted-foreground">
|
|
|
|
|
You'll see a table with the current status, response time, and uptime percentage for each endpoint.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2025-12-23 00:23:21 +00:00
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Using the SDK */}
|
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
<h2 className="text-2xl font-semibold text-foreground">Using the SDK</h2>
|
|
|
|
|
<p className="text-muted-foreground">
|
|
|
|
|
For programmatic access, install the TypeScript SDK:
|
|
|
|
|
</p>
|
|
|
|
|
<div className="bg-muted/50 rounded-lg p-4">
|
|
|
|
|
<code className="text-sm text-foreground">npm install @uptime.link/sdk</code>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="bg-muted/50 rounded-lg p-4 mt-4">
|
|
|
|
|
<pre className="text-sm text-foreground overflow-x-auto">{`import { UptimeClient } from '@uptime.link/sdk';
|
2025-12-23 00:23:21 +00:00
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
const client = new UptimeClient();
|
2025-12-23 00:23:21 +00:00
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
// Check a single endpoint
|
|
|
|
|
const result = await client.check('https://api.example.com');
|
|
|
|
|
console.log(result.status, result.responseTime);
|
2025-12-23 00:23:21 +00:00
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
// Scan local network
|
|
|
|
|
const services = await client.scanNetwork();
|
|
|
|
|
console.log('Found services:', services);`}</pre>
|
|
|
|
|
</div>
|
2025-12-23 00:23:21 +00:00
|
|
|
</div>
|
|
|
|
|
|
2025-12-23 00:37:37 +00:00
|
|
|
{/* Next steps */}
|
|
|
|
|
<div className="space-y-4 pt-4 border-t border-border">
|
|
|
|
|
<h2 className="text-xl font-semibold text-foreground">Next Steps</h2>
|
|
|
|
|
<div className="flex flex-wrap gap-3">
|
|
|
|
|
<Button variant="outline" asChild>
|
|
|
|
|
<Link to="/docs/cli">
|
|
|
|
|
CLI Reference
|
|
|
|
|
<ArrowRight className="ml-2 h-4 w-4" />
|
|
|
|
|
</Link>
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="outline" asChild>
|
|
|
|
|
<Link to="/docs/widgets">
|
|
|
|
|
Status Widgets
|
|
|
|
|
<ArrowRight className="ml-2 h-4 w-4" />
|
|
|
|
|
</Link>
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="outline" asChild>
|
|
|
|
|
<Link to="/docs/detector">
|
|
|
|
|
Network Detector
|
|
|
|
|
<ArrowRight className="ml-2 h-4 w-4" />
|
|
|
|
|
</Link>
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
2025-12-23 00:23:21 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default QuickStart;
|