Skip to content

Instantly share code, notes, and snippets.

View hph's full-sized avatar

Haukur Páll Hallvarðsson hph

View GitHub Profile
@hph
hph / webpack.config.babel.js
Last active April 22, 2017 16:39
Example Electron + React Webpack config
import webpack from 'webpack';
import { resolve } from 'path';
import HtmlPlugin from 'html-webpack-plugin';
import StatefulReactContainerPlugin from 'stateful-react-container-webpack-plugin';
function devProd (inDevelopment, inProduction) {
return process.env.NODE_ENV === 'production' ? inProduction : inDevelopment;
}
{
"error": true
}
'use strict';
const express = require('express');
const server = require('http').createServer();
const WebSocketServer = require('ws').Server;
const app = express();
const wss = new WebSocketServer({ server: server })
app.use(express.static('public'));