Make build configuration

This commit is contained in:
Dominic Zimmer 2025-05-03 14:46:27 +02:00
parent 66424d0c85
commit 2c44979078
4 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,5 @@
{ {
"type": "module",
"name": "foodlog", "name": "foodlog",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,

View File

@ -1,9 +1,11 @@
const { LowSync } = require('lowdb'); import {LowSync} from 'lowdb';
const { JSONFileSync } = require('lowdb/node'); //const { JSONFileSync } = require('lowdb/node');
import {JSONFileSync} from 'lowdb/node';
const db = new LowSync(new JSONFileSync('file.json'), {}) const db = new LowSync(new JSONFileSync('file.json'), {})
const { createServer } = require('node:http'); import {createServer} from 'node:http';
//const { createServer } = require('node:http');
const key = "c3dpZ2dpdHlzd29vdHkK"; const key = "c3dpZ2dpdHlzd29vdHkK";
const reStoreWrite = new RegExp(`/write/${key}/?`) const reStoreWrite = new RegExp(`/write/${key}/?`)

View File

@ -10,7 +10,6 @@ const defaultStore: Store = {
entries: {}, entries: {},
}; };
//const key="c3dpZ2dpdHlzd29vdHkK"
const key = localStorage.getItem("apikey") ?? ""; const key = localStorage.getItem("apikey") ?? "";
export const App : React.FC = () => { export const App : React.FC = () => {

View File

@ -1,7 +1,7 @@
import { ItemType, Store, StoreEntry } from "./types" import { ItemType, Store, StoreEntry } from "./types"
const defaultEndpoint = "http://dominic.leafbla.de:4444" const defaultEndpoint = "https://shulneffapi.leafbla.de"
export type APIEndPoint = { export type APIEndPoint = {
write: (json: string) => Promise<void>, write: (json: string) => Promise<void>,