From 644fc5dfc8c776a3da9e01108a23f7cb2cf4f2bb Mon Sep 17 00:00:00 2001 From: Travis Hardiman Date: Sun, 1 Dec 2024 14:13:28 -0500 Subject: [PATCH] day zero --- package.json | 7 +++---- server.js | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index db06b6c..2aa64af 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "2024.12.01", "description": "Travis's Advent of Code 2024", "author": "Travis Hardiman", - "homepage": "https://meowing-holy-carbon.glitch.me/", + "homepage": "https://github.com/dieseltravis/aoc2024/", "main": "server.js", "scripts": { "test": "node --check server.js && semistandard && eslint server.js public/*.js", @@ -22,11 +22,10 @@ "standard-engine": "^15.1.0" }, "repository": { - "url": "https://glitch.com/edit/#!/meowing-holy-carbon" + "url": "https://github.com/dieseltravis/aoc2024/" }, "license": "Hippocratic-3.0", "keywords": [ - "glitch", "adventofcode", "advent", "advent-of-code", @@ -34,7 +33,7 @@ ], "browserslist": [ "defaults", - "node > 14", + "node > 18", "fully supports es6-module", "maintained node versions" ], diff --git a/server.js b/server.js index 61bad84..dbc4014 100644 --- a/server.js +++ b/server.js @@ -118,6 +118,7 @@ for (let d = 1; d <= 25; d++) { }); }); }); + const partStats = []; for (let p = 1; p <= 2; p++) { // string part @@ -176,6 +177,7 @@ fs.readFile(path.join(__dirname, 'views/stats.ntl'), function (err, content) { a.push(day); return a; }, []); + const statHtml = jsStats.reduce((a, d, i) => { const key = 'day_' + (i + 1); const p1 = d[0];