Skip to content

Commit

Permalink
Merge pull request #1 from ericye16/master
Browse files Browse the repository at this point in the history
Revert "making https a default, using a self-signed cert"
  • Loading branch information
soumith committed Jun 5, 2014
2 parents 58eb407 + 3eb5f62 commit 986c761
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 94 deletions.
12 changes: 6 additions & 6 deletions clients/torch/js.lua
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ function js.startserver(port)
port = port or 8000

-- running?
local status = io.popen('curl -s https://localhost:'..port..'/'):read('*all'):gsub('%s*','')
local status = io.popen('curl -s http://localhost:'..port..'/'):read('*all'):gsub('%s*','')
if status == '' then
-- start up server:
os.execute('node "' .. os.getenv('HOME') .. '/.gfx.js/server.js" --port '..port..' > "' .. os.getenv('HOME') .. '/.gfx.js/server.log" &')
print('[gfx.js] server started on port '..port..', graphics will be rendered into https://localhost:'..port)
print('[gfx.js] server started on port '..port..', graphics will be rendered into http://localhost:'..port)
else
print('[gfx.js] server already running on port '..port..', graphics will be rendered into https://localhost:'..port)
print('[gfx.js] server already running on port '..port..', graphics will be rendered into http://localhost:'..port)
end
end

Expand Down Expand Up @@ -487,12 +487,12 @@ function js.show(port)
-- browse:
if jit.os == 'OSX' then
sys.sleep(0.1)
os.execute('open https://localhost:'..port)
os.execute('open http://localhost:'..port)
elseif jit.os == 'Linux' then
sys.sleep(0.1)
os.execute('xdg-open https://localhost:'..port)
os.execute('xdg-open http://localhost:'..port)
else
print('[gfx.js] show() is only supported on Mac OS/Linux - other OSes: navigate to https://localhost:PORT by hand')
print('[gfx.js] show() is only supported on Mac OS/Linux - other OSes: navigate to http://localhost:PORT by hand')
end
end

Expand Down
33 changes: 0 additions & 33 deletions defaultcert/ca.crt

This file was deleted.

51 changes: 0 additions & 51 deletions defaultcert/ca.key

This file was deleted.

4 changes: 0 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ if (fs.existsSync(configFile)) {
shell: 'bash',
port: 8000,
static: process.env.HOME + '/.gfx.js/static',
"https": {
"key": process.env.HOME + "/.gfx.js/defaultcert/ca.key",
"cert": process.env.HOME + "/.gfx.js/defaultcert/ca.crt"
}
}
}

Expand Down

0 comments on commit 986c761

Please sign in to comment.