mirror of
https://github.com/LukeHagar/sveltekit-electron.git
synced 2025-12-06 12:47:49 +00:00
fix repro
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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' })
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user