aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-01-27 23:27:27 +0000
committerJames Barnett <noreply@jamesbarnett.xyz>2018-01-27 23:27:27 +0000
commit8e831bf7f734b47fe084ee9851ab4772cbb20d2d (patch)
treec525e1798375447d431848d488e6a80de2b23650 /main.js
parentd132e09cdaeb89a164314962d8ee8de722d61549 (diff)
downloadsql-plus-plus-8e831bf7f734b47fe084ee9851ab4772cbb20d2d.tar.xz
sql-plus-plus-8e831bf7f734b47fe084ee9851ab4772cbb20d2d.zip
Add connection pool, code editor and data grid
Diffstat (limited to 'main.js')
-rw-r--r--main.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..b016061
--- /dev/null
+++ b/main.js
@@ -0,0 +1,35 @@
+const electron = require('electron')
+const app = electron.app
+const BrowserWindow = electron.BrowserWindow
+
+const path = require('path')
+const url = require('url')
+
+let mainWindow
+
+function createWindow () {
+ mainWindow = new BrowserWindow({width: 800, height: 600})
+ mainWindow.loadURL(url.format({
+ pathname: path.join(__dirname, 'index.html'),
+ protocol: 'file:',
+ slashes: true
+ }))
+
+ mainWindow.on('closed', function () {
+ mainWindow = null
+ })
+}
+
+app.on('ready', createWindow)
+
+app.on('window-all-closed', function () {
+ if (process.platform !== 'darwin') {
+ app.quit()
+ }
+})
+
+app.on('activate', function () {
+ if (mainWindow === null) {
+ createWindow()
+ }
+})