smiclea / brackets-http-server

Starts an http server on port 8989 at the project root and launches the selected file
16 stars 1 forks source link

Doesn't work on Mac #1

Open awakekat opened 10 years ago

awakekat commented 10 years ago

Brackets 0.44, Mac - up to date Mavericks, Chrome up to date

Installed extension, opened project, clicked button of extension - nothing happened. Is there more to this I need to know to get this working?

smiclea commented 10 years ago

Currently it works only on Windows, but I will provide support for Mac in the next version. Basically I run a command and the syntax for that command is different between OSes, so I will have to check the proper way to run that command on Mac

russwittmann commented 10 years ago

How about SSI support?

smiclea commented 10 years ago

@russwittmann That would probably require alterations to the http-server nodejs module itself. This project is just a Brackets extension that wraps that module for Brackets use. For more info about the actual server visit: https://www.npmjs.org/package/http-server

objectkit commented 9 years ago

HI there- just wondering if there's been any progress on an OSX compatible edition? This extension will fill a gap in my workflow painlessly and very much looking forward to it. Also, if I could be so cheeky, a little icon in the right most column would be great to toggle it on and off in the next release.

Brackets 1.0, OSX Mavericks

MrFranke commented 9 years ago

2015-01-10 1 09 03 On my mac i got that error

The error due to space in rootPath. I fix this, but i got permission error: /Library/Application Support/Brackets/extensions/user/brackets-http-server/node/node_modules/.bin/http-server: Permission denied maybe anybody know how fix this problem?

michaelpigg commented 9 years ago

Here are the fixes that I applied to get the server to start on OS X.

In main.js, change line 83 to deal with spaces in path:

var modPath = ExtensionUtils.getModulePath(module).replace(/ /g, "\\ ");
nodeConnection.domains['http-server'].start(rootPath, PORT, modPath).fail(function (msg) {

Change permissions on brackets/node/node_modules/.bin/http-server to allow execution:

chmod u+x ~/Library/Application\ Support/Brackets/extensions/user/brackets-http-server/node/node_modules/.bin/http-server

This may not apply to everyone, but I don't have node installed system-wide, so I changed the shell in .bin/http-server from sh to my usual shell zsh.

smiclea commented 9 years ago

I accepted @michaelpigg pull request. But I'm planning on working on o solution for both Mac and Linux this month.

smiclea commented 9 years ago

@michaelpigg's update is now online