Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser('diffcalc-secret-key'));
app.use(express.static(path.join(__dirname, 'public')));

// Health check endpoint for Render
// Homepage
app.get('/', function(req, res) {
res.render('home');
});

// Health check endpoint for Render
app.get('/health', function(req, res) {
res.status(200).send('OK');
});

Expand Down
2 changes: 1 addition & 1 deletion render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
name: diffcalc
runtime: docker
plan: free
healthCheckPath: /
healthCheckPath: /health
envVars:
- key: NODE_ENV
value: production
Expand Down
48 changes: 48 additions & 0 deletions views/home.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CleanTime.live - Recovery Time Calculator</title>
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<div class="container">
<h1>CleanTime.live</h1>

<div class="message">
<p><strong>What is CleanTime.live?</strong></p>
<p>CleanTime.live is a tool for recovery events or groups to collectively track and celebrate clean time milestones. It allows events or groups to gather clean time data from their members and display combined totals during celebrations, anniversaries, and special occasions.</p>
</div>

<div class="admin-section">
<h2 style="color: #667eea; margin-bottom: 15px;">How It Works</h2>
<ul style="list-style-position: inside; line-height: 2;">
<li>Each event or group gets their own private space</li>
<li>Members submit their clean date via a simple form</li>
<li>The tool calculates years, months, and days of clean time</li>
<li>Events or groups can view combined totals for celebrations</li>
<li>QR codes available for easy mobile access</li>
</ul>
</div>

<hr>

<div class="admin-section">
<h2 style="color: #667eea; margin-bottom: 15px;">Request Access</h2>
<p style="margin-bottom: 15px;">CleanTime.live is not self-service. To request a space for your event or group, please submit an issue on GitHub:</p>
<a href="https://github.com/bmlt-enabled/diffcalc/issues/new?title=Request%20new%20group%20space&body=Group%20name:%0AContact%20email:%0A"
class="btn-edit"
style="display: inline-block; padding: 14px 30px; font-size: 1.1em; text-align: center; width: auto;">
Request a Space
</a>
</div>

<hr>

<div style="text-align: center; color: #777; font-size: 0.9em;">
<p>CleanTime.live is a free service for recovery communities.</p>
</div>
</div>
</body>
</html>