|
|
|
@ -1,19 +1,20 @@ |
|
|
|
|
#!/usr/bin/env node |
|
|
|
|
var path = require('path') |
|
|
|
|
var httpServer = require('http-server') |
|
|
|
|
var remixd = require('remixd') |
|
|
|
|
|
|
|
|
|
var server = httpServer.createServer({ |
|
|
|
|
root: __dirname + '/../' |
|
|
|
|
root: path.join(__dirname, '/../') |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
var folder = process.argv.length > 2 ? process.argv[2] : process.cwd() |
|
|
|
|
|
|
|
|
|
server.listen(8080, '127.0.0.1', function () {}) |
|
|
|
|
var router = new remixd.Router(65520, remixd.services.sharedFolder, { remixIdeUrl: 'http://localhost:8080' }, (webSocket) => { |
|
|
|
|
remixd.services.sharedFolder.setWebSocket(webSocket) |
|
|
|
|
remixd.services.sharedFolder.setupNotifications(folder) |
|
|
|
|
remixd.services.sharedFolder.sharedFolder(folder, false) |
|
|
|
|
}) |
|
|
|
|
remixd.services.sharedFolder.setWebSocket(webSocket) |
|
|
|
|
remixd.services.sharedFolder.setupNotifications(folder) |
|
|
|
|
remixd.services.sharedFolder.sharedFolder(folder, false) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
router.start() |
|
|
|
|
|
|
|
|
|