UNPKG

react-text-highlighter

Version:

Simple higher order component for React for text highlighting. Works nicely with React 0.14+ and stateless components

28 lines (21 loc) 610 B
var path = require('path'); var express = require('express'); var webpack = require('webpack'); var config = require('./webpack.config'); var app = express(); var compiler = webpack(config); app.use(require('webpack-dev-middleware')(compiler, { noInfo: false, publicPath: config.output.publicPath })); app.use(require('webpack-hot-middleware')(compiler)); app.get('*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); }); app.listen(3000, 'localhost', function(err) { if (err) { console.log(err); return; } console.log('Listening at http://localhost:3000'); });