1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-07-18 04:33:50 +02:00

added stud

This commit is contained in:
TheGreyDiamond
2020-11-25 21:52:56 +01:00
parent 92e8b9095b
commit 472984f9e7
4 changed files with 133 additions and 0 deletions

View File

@ -1,4 +1,5 @@
const { app, BrowserWindow, screen, ipcMain, BrowserView } = require("electron");
var Config = require('config-js');
const fs = require("fs");
const { win32 } = require("path");
const sysInf = require("systeminformation");
@ -179,6 +180,7 @@ function init() {
networkInterfaces = data;
});
var langs = new Config('./lang/langs_v1.js');
sessionState = 0; // Init with no connection
setTimeout(function(){
@ -190,9 +192,14 @@ function init() {
restApp.get('/', (req, res) => {
res.send('Hello World! The RestFul API of Enlight is up and working!')
})
restApp.get('/api/v1/ping', (req, res) => {
res.json({state:"Succes"});
})
restApp.get('/api/v1/session/info', (req, res) => {
res.json({state:"Succes", implementation: "Not yet implemted."});
})
}, 20);
// Handling sessioning