aboutsummaryrefslogtreecommitdiffstats
path: root/development/beefy.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-07-01 09:22:16 +0800
committerDan Finlay <dan@danfinlay.com>2016-07-01 09:22:16 +0800
commite55938ed15428b452224f2d731c1e7ad141869d4 (patch)
tree7f267bf875e1bd714896cde8ae7244c601eb5d4a /development/beefy.js
parent9a8ede22106c3f59d014be4905a078711180d30c (diff)
downloadtangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar.gz
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar.bz2
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar.lz
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar.xz
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.tar.zst
tangerine-wallet-browser-e55938ed15428b452224f2d731c1e7ad141869d4.zip
First simple version of ui mocker
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!')
+}