mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-20 07:35:47 +00:00
remove not needed host project
This commit is contained in:
13
ElectronNET.Host/.vscode/launch.json
vendored
13
ElectronNET.Host/.vscode/launch.json
vendored
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Electron App",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"runtimeExecutable": "${workspaceRoot}\\node_modules\\.bin\\electron.cmd",
|
||||
"program": "${workspaceRoot}\\main.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
const { app, BrowserWindow, Notification } = require('electron');
|
||||
const io = require('socket.io')(3000);
|
||||
const path = require('path');
|
||||
|
||||
let window;
|
||||
let apiProcess;
|
||||
|
||||
app.on('ready', () => {
|
||||
const process = require('child_process').spawn;
|
||||
|
||||
// run server
|
||||
var apipath = path.join(__dirname, '\\bin\\ElectronNET.WebApp.exe');
|
||||
apiProcess = process(apipath);
|
||||
|
||||
apiProcess.stdout.on('data', (data) => {
|
||||
var text = data.toString();
|
||||
console.log(`stdout: ${data.toString()}`);
|
||||
});
|
||||
});
|
||||
|
||||
io.on('connection', (socket) => {
|
||||
console.log('ASP.NET Core Application connected...');
|
||||
|
||||
socket.on('createBrowserWindow', (options) => {
|
||||
console.log(options);
|
||||
options.show = true;
|
||||
|
||||
window = new BrowserWindow(options);
|
||||
window.loadURL('http://localhost:5000');
|
||||
|
||||
window.on('closed', function () {
|
||||
mainWindow = null;
|
||||
apiProcess = null;
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('createNotification', (options) => {
|
||||
const notification = new Notification(options);
|
||||
notification.show();
|
||||
});
|
||||
});
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', () => {
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
1411
ElectronNET.Host/package-lock.json
generated
1411
ElectronNET.Host/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "ElectronNET.Host",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"electron": "^1.7.8",
|
||||
"socket.io": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
Reference in New Issue
Block a user