Make server module

This commit is contained in:
Dominic Zimmer 2025-05-11 22:31:22 +02:00
parent c3c87b005c
commit 998d9a2590
2 changed files with 7 additions and 3 deletions

4
rebuild-web.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
npm run build
sudo rm ../web/* -rf
sudo cp build/* ../web/

View File

@ -1,9 +1,9 @@
const { LowSync } = require('lowdb'); import { LowSync } from 'lowdb';
const { JSONFileSync } = require('lowdb/node'); import { JSONFileSync } from 'lowdb/node';
const db = new LowSync(new JSONFileSync('data/file.json'), {}) const db = new LowSync(new JSONFileSync('data/file.json'), {})
const { createServer } = require('node:http'); import { createServer } from 'node:http';
import * as http from 'node:http'; import * as http from 'node:http';
const key = "c3dpZ2dpdHlzd29vdHkK"; const key = "c3dpZ2dpdHlzd29vdHkK";