remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/bin/remix-ide

22 lines
741 B

7 years ago
#!/usr/bin/env node
6 years ago
var path = require('path')
7 years ago
var httpServer = require('http-server')
var remixd = require('remixd')
7 years ago
var server = httpServer.createServer({
6 years ago
root: path.join(__dirname, '/../')
})
7 years ago
var folder = process.argv.length > 2 ? process.argv[2] : process.cwd()
7 years ago
server.listen(8080, '127.0.0.1', function () {})
var router = new remixd.Router(65520, remixd.services.sharedFolder, { remixIdeUrl: 'http://localhost:8080' }, (webSocket) => {
6 years ago
remixd.services.sharedFolder.setWebSocket(webSocket)
remixd.services.sharedFolder.setupNotifications(folder)
remixd.services.sharedFolder.sharedFolder(folder, false)
})
6 years ago
router.start()
6 years ago
console.log('\x1b[33m%s\x1b[0m', 'Starting Remix IDE at http://localhost:8080 and sharing ' + folder)