UNPKG

@isthatuzii/create-nano-app

Version:

Desktop application scaffolding tool for the Nano Framework

25 lines (22 loc) 730 B
const functions = { getSystemInfo: async () => { const response = await fetch("/api/system-info"); return await response.json(); }, sendNotification: async (data) => { const response = await fetch("/api/notify", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(data), }); return await response.json(); }, greet: async (name) => { const params = name ? `?name=${encodeURIComponent(name)}` : ""; const response = await fetch(`/api/greet${params}`); return await response.json(); } }; export default functions;