# Beagle webapp steps To make the webapp work with browserify, you need to follow some steps: ## 1. Transfrom some requirements You need to transform : `require("./public/js/bangjs")` into `require("./bangjs")` [login.js:**1**], `require("./public/js/cosmicDispatcher")` into `require("./cosmicDispatcher")` [login.js:**52**], `require('./public/js/PanelManager')` into `require('./PanelManager')` [overlay.js:**1**] ## 2. Transform and delete some lines You can delete these lines : ```javascript titleBar.addEventListener('dblclick', function(e) { e.preventDefault() currentWindow.maximize() }) currentWindow.on('enter-full-screen', function() { fullscreenHandle(true) }) currentWindow.on('leave-full-screen', function() { fullscreenHandle(false) }) ``` [overlay.js:**108**] and this one : ```javascript let isFullscreen = currentWindow.isFullScreen || currentWindow.isSimpleFullScreen ``` [overlay:js:**70**] and every time the function `fullscreenHandle` is called (only in [overlay.js]), set the parameter to `true` ## 3. Browserify the world Run `npm install -g browserify` > If the `Beagle/webapp` folder do not exists, please create it and follow theses steps: > * create `Beagle/webapp/js/` > * copy `Beagle/public/css/` and `Beagle/public/resources/` folders into `Beagle/webapp` > * copy `Beagle/index.html` into `Beagle/webapp` > * replace every `./public/css` by `./css`, every `./public/js` by `./js` and every `./public/resources` by `./resources` in `Beagle/webapp/index.html` then run `browserify public/js/login.js -o webapp/js/login.js && browserify public/js/overlay.js -o webapp/overlay.js` Now the last step is to comment some lines: ```javascript await this._db.clear() ``` [login.js:**~72156**] (in `DBObject` class, function `_init`) ```javascript this.db.clear(opts, callback) ``` [login.js:**~105343**] (in `DB.prototype._clear` function) Now you can launch the webapp and try to connect, but `pubsub is currently not supported when run in the browser` Congratulations, task successfully failed!