This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const electron = require('electron') | |
const http = require('http') | |
const initServer = require('./js/server') | |
// Module to control application life. | |
const app = electron.app | |
// Module to create native browser window. | |
const BrowserWindow = electron.BrowserWindow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const io = require('socket.io-client') | |
const CONSTANTS = require('./const') | |
const socket = io.connect('http://localhost:' + CONSTANTS.PORT) | |
const theLight = document.getElementById('the-light') | |
// log the message, check if socket.io server is connected | |
socket.on('init', (data) => { | |
console.log(data.message) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Lamp</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="css/style.css"> | |
</head> | |
<body> | |
<div id="the-light"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
background: black; | |
} | |
body { | |
display: flex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
$posted_data = PHP array consisting posted data from the form : | |
$posted_data = array( | |
'message' => '', | |
'fullname' => '', | |
'company' => '', | |
'position' => '', | |
'telephone' => '', | |
'email' => '' | |
); |
OlderNewer