From 876d264db5494ec04bda5b1d0af5491508c685ca Mon Sep 17 00:00:00 2001 From: Stu Alexandere Date: Thu, 11 Dec 2025 19:10:31 +0000 Subject: [PATCH] test --- extras/graphite-demo/server.js | 36 ++++++++++++++++++++++++++++++++++ extras/mycelia | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 extras/graphite-demo/server.js diff --git a/extras/graphite-demo/server.js b/extras/graphite-demo/server.js new file mode 100644 index 00000000..cf7ec650 --- /dev/null +++ b/extras/graphite-demo/server.js @@ -0,0 +1,36 @@ +const express = require('express'); +const app = express(); +const port = 3000; + +// Fake data for tasks +const tasks = [ + { + id: 1, + description: 'Complete monthly financial report' + }, + { + id: 2, + description: 'Plan team building activity' + }, + { + id: 3, + description: 'Update project documentation' + } +]; + +app.get('/search', (req, res) => { + // Retrieve the query parameter + const query = req.query.query?.toLowerCase() || ''; + + // Filter tasks based on the query + const filteredTasks = tasks.filter(task => task.description.toLowerCase().includes(query)); + + // Sort the filtered tasks alphabetically by description + const sortedTasks = filteredTasks.sort((a, b) => a.description.localeCompare(b.description)); + + res.json(sortedTasks); +}); + +app.listen(port, () => { + console.log(`Server running on port ${port}`); +}); \ No newline at end of file diff --git a/extras/mycelia b/extras/mycelia index 47ea1966..de1f20b7 160000 --- a/extras/mycelia +++ b/extras/mycelia @@ -1 +1 @@ -Subproject commit 47ea1966dd8a8c10662c91c7a3f907798f6a7dbc +Subproject commit de1f20b76861254f86c652a8180bd5fd1165d644