mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Update Nightscout to version 15.0.4 and configure for Replit
Update project documentation and startup script for Nightscout v15.0.4, including Replit specific configurations like INSECURE_USE_HTTP=true and webpack bundling. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 748e831e-92ae-4927-9569-47665f47f29c Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 6e1d3764-af75-4a2b-a75f-f7252955326d Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ea4278b-5c6c-4065-9cb8-f1013771318d/748e831e-92ae-4927-9569-47665f47f29c/FO8cDm7 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
Generated
+12175
-6908
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
|||||||
|
# Nightscout CGM Remote Monitor
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Nightscout is a web-based CGM (Continuous Glucose Monitor) system allowing caregivers to remotely view a patient's glucose data in realtime. This is version 15.0.4 of the cgm-remote-monitor project.
|
||||||
|
|
||||||
|
## Current State
|
||||||
|
- Project is set up and running on Replit
|
||||||
|
- MongoDB is configured locally for development
|
||||||
|
- Server runs on port 5000 with host 0.0.0.0
|
||||||
|
- Webpack bundling for frontend assets
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
- `lib/server/server.js` - Main application entry point
|
||||||
|
- `lib/server/app.js` - Express application setup
|
||||||
|
- `lib/server/env.js` - Environment configuration
|
||||||
|
- `lib/api/` - REST API v1 endpoints
|
||||||
|
- `lib/api2/` - REST API v2 endpoints
|
||||||
|
- `lib/api3/` - REST API v3 endpoints
|
||||||
|
- `lib/plugins/` - Nightscout plugins (ar2, basal, bolus, etc.)
|
||||||
|
- `lib/storage/` - MongoDB storage adapters
|
||||||
|
- `lib/client/` - Client-side code
|
||||||
|
- `static/` - Static files (HTML, CSS, frontend assets)
|
||||||
|
- `bundle/` - Webpack bundle source files
|
||||||
|
- `webpack/` - Webpack configuration
|
||||||
|
- `start.sh` - Startup script that launches MongoDB and the app
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
- `PORT` - Server port (set to 5000)
|
||||||
|
- `HOSTNAME` - Bind address (set to 0.0.0.0)
|
||||||
|
- `MONGO_CONNECTION` - MongoDB connection string
|
||||||
|
- `API_SECRET` - API authentication secret (minimum 12 characters)
|
||||||
|
- `INSECURE_USE_HTTP` - Set to true for Replit proxy compatibility
|
||||||
|
|
||||||
|
## Running the Project
|
||||||
|
The workflow automatically:
|
||||||
|
1. Starts MongoDB with data stored in `/home/runner/data/db`
|
||||||
|
2. Launches the Node.js server on port 5000
|
||||||
|
|
||||||
|
## NPM Scripts
|
||||||
|
- `npm start` - Start production server
|
||||||
|
- `npm run bundle` - Build webpack bundles
|
||||||
|
- `npm run dev` - Start development server with nodemon
|
||||||
|
- `npm test` - Run tests
|
||||||
|
|
||||||
|
## Recent Changes
|
||||||
|
- 2025-12-31: Updated to version 15.0.4 (dev branch)
|
||||||
|
- Configured for Replit environment with INSECURE_USE_HTTP=true
|
||||||
|
- Uses MongoDB 3.6.x driver
|
||||||
|
- Webpack bundling for frontend assets
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir -p /home/runner/data/db
|
||||||
|
|
||||||
|
if ! pgrep -x "mongod" > /dev/null; then
|
||||||
|
echo "Starting MongoDB..."
|
||||||
|
mongod --dbpath /home/runner/data/db --fork --logpath /home/runner/data/mongod.log --bind_ip 127.0.0.1
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Starting Nightscout server..."
|
||||||
|
node lib/server/server.js
|
||||||
Reference in New Issue
Block a user