aboutsummaryrefslogtreecommitdiffstats
path: root/development/beefy.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-07-01 12:22:39 +0800
committerDan Finlay <dan@danfinlay.com>2016-07-01 12:22:39 +0800
commitd33d4f065492d32df35c8eb72a7c51b74bf4b155 (patch)
tree8f7788329475f00dedf2039364862a6bd4fe298b /development/beefy.js
parentaa21c83470d2fa89a5dc09a49c7ab83cf4e87ad7 (diff)
parentd4e400e5e5a7ba501f210b722f6ccf97be9e6c17 (diff)
downloadtangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar.gz
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar.bz2
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar.lz
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar.xz
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.tar.zst
tangerine-wallet-browser-d33d4f065492d32df35c8eb72a7c51b74bf4b155.zip
Merge branch 'master' into FrankieDisclaimer
Diffstat (limited to 'development/beefy.js')
-rw-r--r--development/beefy.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/development/beefy.js b/development/beefy.js
new file mode 100644
index 000000000..0ed40f177
--- /dev/null
+++ b/development/beefy.js
@@ -0,0 +1,29 @@
+const beefy = require('beefy')
+const http = require('http')
+const fs = require('fs')
+const path = require('path')
+const states = require('./states')
+
+const statesPath = path.join(__dirname, 'states.js')
+const statesJson = JSON.stringify(states)
+fs.writeFileSync(statesPath, statesJson)
+
+const port = 8124
+
+const handler = beefy({
+ entries: ['mocker.js']
+ , cwd: __dirname
+ , live: true
+ , quiet: false
+ , bundlerFlags: ['-t', 'brfs']
+})
+
+console.dir(handler)
+
+http.createServer(handler).listen(port)
+console.log(`Now listening on port ${port}`)
+
+function on404(req, resp) {
+ resp.writeHead(404, {})
+ resp.end('sorry folks!')
+}