- Added Electron entry point in `electron/main.js` to run the Express server in-process and open the main application window. - Updated `package.json` to include Electron dependencies and scripts for building and running the application. - Refactored server startup logic into `server/start.js` for better modularity and to support both CLI and Electron usage. - Implemented environment variable handling for database and image paths to accommodate Electron's packaging. - Created a script `server/scripts/promote-morphix.js` to merge admin and morphix accounts into a single user. - Adjusted image root path resolution in `server/media/images.js` to allow for environment variable overrides. - Cleaned up `server/index.js` to delegate server initialization to the new `startServer` function.
77 lines
2.2 KiB
JSON
77 lines
2.2 KiB
JSON
{
|
|
"name": "online-radio-explorer",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Touchscreen kiosk + admin for exploring and playing internet radio.",
|
|
"main": "electron/main.js",
|
|
"scripts": {
|
|
"dev": "concurrently -k -n web,api -c blue,green \"npm:dev:web\" \"npm:dev:api\"",
|
|
"dev:web": "vite",
|
|
"dev:api": "node --watch server/index.js",
|
|
"build": "vite build",
|
|
"start": "node server/index.js",
|
|
"seed": "node server/scripts/seed.js",
|
|
"images:fetch": "node server/scripts/download-images.js",
|
|
"electron": "electron .",
|
|
"electron:dev": "npm run build && electron .",
|
|
"postinstall": "electron-builder install-app-deps",
|
|
"dist": "npm run build && electron-builder",
|
|
"dist:win": "npm run build && electron-builder --win",
|
|
"dist:linux": "npm run build && electron-builder --linux"
|
|
},
|
|
"dependencies": {
|
|
"bcryptjs": "^2.4.3",
|
|
"better-sqlite3": "^11.3.0",
|
|
"cookie": "^1.0.1",
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.21.0",
|
|
"node-cron": "^3.0.3",
|
|
"ws": "^8.18.0"
|
|
},
|
|
"devDependencies": {
|
|
"concurrently": "^9.0.1",
|
|
"electron": "^32.3.3",
|
|
"electron-builder": "^25.1.8",
|
|
"hls.js": "^1.5.17",
|
|
"vite": "^5.4.8"
|
|
},
|
|
"build": {
|
|
"appId": "nl.oradio.app",
|
|
"productName": "Online Radio Explorer",
|
|
"asar": true,
|
|
"asarUnpack": [
|
|
"node_modules/better-sqlite3/**"
|
|
],
|
|
"files": [
|
|
"electron/**",
|
|
"server/**",
|
|
"!server/scripts/**",
|
|
"data/seed/**",
|
|
"package.json"
|
|
],
|
|
"directories": {
|
|
"output": "dist-electron",
|
|
"buildResources": "build"
|
|
},
|
|
"win": {
|
|
"target": [
|
|
"nsis"
|
|
]
|
|
},
|
|
"linux": {
|
|
"target": [
|
|
{
|
|
"target": "AppImage",
|
|
"arch": [
|
|
"x64",
|
|
"arm64",
|
|
"armv7l"
|
|
]
|
|
}
|
|
],
|
|
"category": "AudioVideo"
|
|
}
|
|
}
|
|
}
|