Change port for development

This commit is contained in:
Korbs 2023-07-10 08:14:10 -04:00
parent b9bb4a89a0
commit 5ff2b02d48
No known key found for this signature in database
3 changed files with 20 additions and 13 deletions

View file

@ -1,2 +1,10 @@
import { defineConfig } from 'astro/config' import { defineConfig } from 'astro/config'
export default defineConfig({srcDir: './astro',outDir: './app'}) export default defineConfig({
srcDir: './astro',
outDir: './app',
compressHTML: true,
server: {
host: false,
port: 1567
}
})

View file

@ -1,7 +1,6 @@
const {BrowserWindow} = require('electron') const {BrowserWindow} = require('electron')
const glasstron = require('glasstron-clarity') // By SudoVanilla
const path = require('path') const path = require('path')
const {TitlebarRespect} = require('electron-titlebar-respect') // By SudoVanilla const {TitlebarRespect} = require('electron-titlebar-respect')
let AppMenu = require('./menu') let AppMenu = require('./menu')
let Notification = require('./notifications') let Notification = require('./notifications')
@ -11,18 +10,19 @@ TitlebarRespect({})
module.exports = { module.exports = {
Create: function() { Create: function() {
mainWindow = new glasstron.BrowserWindow({ mainWindow = new BrowserWindow({
title: process.env.Name, title: process.env.Name, // Edit this in .env
minWidth: 400, minWidth: 400,
minHeight: 400, minHeight: 400,
width: 1200, width: 1200,
height: 800, height: 800,
autoHideMenuBar: true, autoHideMenuBar: true,
show: false, show: false,
blur: true, frame: global.frame, // Controlled by Electron Titlebar Respect
frame: global.frame, titleBarStyle: global.titleBarStyle, // Controlled by Electron Titlebar Respect
titleBarStyle: global.titleBarStyle, icon: global.AppIcon, // Found in ./platform.js
icon: global.AppIcon, vibrancy: 'sidebar',
transparent: true,
trafficLightPosition: { x: 25, y: 25 }, // Position of Traffic Light buttons on macOS trafficLightPosition: { x: 25, y: 25 }, // Position of Traffic Light buttons on macOS
titleBarOverlay: { // Background and Height of Windows titlebar buttons titleBarOverlay: { // Background and Height of Windows titlebar buttons
color: '#232323', // Background color: '#232323', // Background
@ -36,7 +36,7 @@ module.exports = {
// Load Content // Load Content
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
mainWindow.loadURL('http://localhost:3000') // Use a URL in development mode mainWindow.loadURL('http://localhost:1567') // Use a URL in development mode
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
mainWindow.loadFile('app/index.html') // Do NOT use a URL in production mode, as that can create a security risk for your users who will use this app mainWindow.loadFile('app/index.html') // Do NOT use a URL in production mode, as that can create a security risk for your users who will use this app
} }

View file

@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "./electron/index.js", "main": "./electron/index.js",
"scripts": { "scripts": {
"start": "concurrently \"astro dev\" \"wait-on http://localhost:3000 && NODE_ENV=development electron .\"", "start": "concurrently \"astro dev\" \"wait-on http://localhost:1567 && NODE_ENV=development electron .\"",
"build": "astro build && NODE_ENV=production node ./build/prepare-production.js && electron-builder build --config ./build/electron-builder.yml" "build": "astro build && NODE_ENV=production node ./build/prepare-production.js && electron-builder build --config ./build/electron-builder.yml"
}, },
"author": "SudoVanilla", "author": "SudoVanilla",
@ -20,7 +20,6 @@
"bugsplat-node": "^3.0.0", "bugsplat-node": "^3.0.0",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"electron-titlebar-respect": "^1.1.1", "electron-titlebar-respect": "^1.1.1",
"glasstron-clarity": "^0.1.26",
"pushy-electron": "^1.0.11", "pushy-electron": "^1.0.11",
"replace": "^1.2.2", "replace": "^1.2.2",
"sass": "^1.60.0", "sass": "^1.60.0",