diff options
First simple version of ui mocker
Diffstat (limited to 'development/beefy.js')
-rw-r--r-- | development/beefy.js | 29 |
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!') +} |