fix repro

This commit is contained in:
Luke Hagar
2023-11-17 14:23:27 -06:00
parent 6b0ae6ff69
commit 3492da0b46
3 changed files with 15 additions and 12 deletions

View File

@@ -5,7 +5,6 @@
"main": "./out/main/index.js",
"author": "example.com",
"homepage": "https://www.electronjs.org",
"type": "module",
"scripts": {
"format": "prettier --write .",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",

View File

@@ -1,8 +1,8 @@
import { app, shell, BrowserWindow } from 'electron'
import { join } from 'path'
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
import { handler } from '../../../Built-App/src/handler.js'
import icon from '../../resources/icon.png?asset'
import { handler } from '../../../Svelte-Build/src/handler.js'
import express from 'express'
const port = 3000
@@ -10,6 +10,7 @@ const origin = `http://localhost:${port}`
const server = express()
const createServer = async () => {
// add a route that lives separately from the SvelteKit app
server.get('/healthcheck', (req, res) => {
res.end('ok')
@@ -21,6 +22,9 @@ server.use(handler)
server.listen(3000, () => {
console.log(`Server listening on ${origin}`)
})
}
createServer()
function createWindow(): void {
// Create the browser window.

View File

@@ -11,7 +11,7 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({ out: '../Built-App/src' })
adapter: adapter({ out: '../Svelte-Build/src' })
}
};