Fixed dockerfile, added a docker-compose.yml, added db init function to run on every startup
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
import * as Bun from "bun";
|
||||
|
||||
export function sendNotification(title: string, body: string, click?: string | null) {
|
||||
export async function sendNotification(title: string, body: string, click?: string | null) {
|
||||
const command = [
|
||||
"python",
|
||||
"./app/notification.py",
|
||||
"./src/notification.py",
|
||||
`--title=${title}`,
|
||||
`--body=${body}`,
|
||||
];
|
||||
if (click) {
|
||||
if ( click ) {
|
||||
command.push(`--click=${click}`);
|
||||
}
|
||||
Bun.spawn(command);
|
||||
const proc = Bun.spawn(command);
|
||||
const text = await proc.stdout.text();
|
||||
console.log("sendNotification: " + text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user