Initial commit for Greenlens

This commit is contained in:
Timo Knuth
2026-03-16 21:31:46 +01:00
parent 307135671f
commit 05d4f6e78b
573 changed files with 54233 additions and 1891 deletions

19
fetch_plants.js Normal file
View File

@@ -0,0 +1,19 @@
const { openDatabase, all, closeDatabase, getDefaultDbPath } = require('./server/lib/sqlite');
const { getPlants } = require('./server/lib/plants');
async function main() {
let db;
try {
db = await openDatabase();
const plants = await getPlants(db, { limit: 500 });
console.log(JSON.stringify(plants, null, 2));
} catch (error) {
console.error(error);
process.exit(1);
} finally {
if (db) await closeDatabase(db);
}
}
main();