Code Monkey home page Code Monkey logo

brackets-server's Introduction

IMPORTANT

There is a new project derived from this one: nodeSpeed IDE.

Since I’m not able to actively maintain this project, I encourage everyone interested to use and support the new one.

Brackets Server

Brackets Server is a server for providing hosted version of the popular code editor Brackets. The code editor can be loaded directly in the web browser and it doesn’t require additional installations or browser extensions. Brackets works just like the desktop version, except that all projects and files reside on the server instead of the local file system.

The server may be useful for remote development, real-time changes and testing, development form thin clients or devices such as tablets, or it could be used in conjunction with other web applications for collaboration.

To check the current verion of Brackets source used in the server, please see CHANGELOG.

Installation

Install from npm:

$ npm install brackets -g

Usage Examples

$ brackets --port 80 --proj-dir /var/projects --supp-dir /var/brackets

IMPORTANT: Make sure projects directory exists.

IMPORTANT: Brackets Server cannot work simultaneously on the same machine with the desktop Brackets because of port conflict in one of the build-in modules. The error thrown is: "Error: listen EADDRINUSE". To workaround this problem if you ever need to use bouth simultaneously, run Brackets Server in Docker container.

All arguments are optional.

Short Option Long Option Default Value Description
-p <prot> --port 6800 TCP port on which Brackets server is listening.
-j <dir> --proj-dir ~/Projects Root directory for projects. Directories above this root cannot be accessed.
-s <dir> --supp-dir ~/.brackets-srv Root directory for Brackets supporting files such as user extensions, configurations and state persistence.
-d --user-domains false Allows Node domains to be loaded from user extensions.

NOTE: Some Brackets extensions require external Node.js process, called node domain. Node domains run on the server, thereby allowing arbitrary code to be executed on the server through custom extensions. Since this imposes very serious security and stability risks, Brackets Server will not load nor execute domains from user extensions, unless -d option is specified.

Embedding Brackets Server in Web Applications

Example with Express:

    var path        = require("path"),
        http        = require("http"),
        express     = require("express"),
        brackets    = require("brackets"),
        app         = express(),
        server      = http.createServer(app);

    app.get("/", function (req, res) {
        res.send("Hello World");
    });

    var bracketsOpts = {
        projectsDir: path.join(__dirname, ".."),
        supportDir: path.join(__dirname, "..", "/support")
    };
    brackets(server, bracketsOpts);

    server.listen(3000);

    console.log("Your application is availble at http://localhost:3000");
    console.log("You can access Brackets on http://localhost:3000/brackets/");

NOTE: The default values for projectsDir and supportDir are different when Brackets Server is initiated from code. They are respectively ./projects and ./brackets, relative to the current working directory.

Options:

Option Default Value Description
httpRoot /brackets Defines the root HTTP endpoint for Brackets Server (http://yourdomain.com/brackets).
projectsDir ./projects Root directory for projects. Directories above this root cannot be accessed.
supportDir ./brackets Root directory for Brackets supporting files such as user extensions, configurations and state persistence.
allowUserDomains false Allows Node domains to be loaded from user extensions.

Contributing

Please see CONTRIBUTING.md

License

(MIT License)

Copyright (c) 2012 Boyan Rabchev [email protected]. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

brackets-server's People

Contributors

dcohenb avatar rabchev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brackets-server's Issues

Can't install add-ons/theme

When trying to install add-ons or themes for the IDE the download starts but then the editor freezes in a never-endig loop

NPM package is outdated

Hello,

It seems the version of brackets-server gotten with npm install brackets is a dated version that uses brackets 0.44. Is this intentional?

Issue with CodeMirror2

Looks like CodeMirror2 is not available anymore.

Submodule path 'brackets-src/src/extensions/default/JavaScriptCodeHints/thirdparty/tern': checked out '7606a6448a8f7a2aacd50d10d9752440689803e8' Cloning into 'src/thirdparty/CodeMirror'... Username for 'https://github.com': Password for 'https://github.com': remote: Repository not found. fatal: Authentication failed for 'https://github.com/adobe/CodeMirror2.git/' Clone of 'https://github.com/adobe/CodeMirror2.git' into submodule path 'src/thirdparty/CodeMirror' failed

Hostname/IP doesn't match certificate's altnames

On startup of the server, I get the following ERROR.

➜  jsecademy git:(master) ✗ sudo brackets --port 80 --proj-dir /var/www --supp-dir /var/brackets

  listening on port 80


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Hostname/IP doesn't match certificate's altnames
    at SecurePair.<anonymous> (tls.js:1379:23)
    at SecurePair.EventEmitter.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:982:10)
    at CleartextStream.read [as _read] (tls.js:469:13)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.write [as _write] (tls.js:366:25)
    at doWrite (_stream_writable.js:221:10)
    at writeOrBuffer (_stream_writable.js:211:5)
    at EncryptedStream.Writable.write (_stream_writable.js:180:11)
    at write (_stream_readable.js:583:24)

Service crashed.

Hello,
I have tried to run brackets on our linux test server.
At first it looks all fine -> good work from you.
So I had opened the bracket editor in my local browser.
But then the service is crashed if a second user makes a request to the service.
Now it looks for a general issue.
I work with the editor and the service crashed with this exception.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: getaddrinfo ENOTFOUND
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)

Regards
Lars

drag / drop not working

do you know how to get drag and drop into the file tree working ? I need to be able to drag a file from my desktop into the brackets folder tree

Socket.io version should be locked at 1.1.0

Hey, I was trying to build the project myself and found some crazyness involving socket.io connection to the server.

I haven't yet found where exactly the problem is, but by locking my socket.io version to 1.1.0 and running grunt build again in order to reminify the js of brackets solved the issue. Thus it must be related to the version (1.3.5 was the one that was being installed).

I'll continue to look into this.

update to 1.5

When starting brackets server, a dialog pops up to say that 1.5 is available, and do I want to install it. I installed brackets server using "npm install brackets -g"

Is it possible to install brackets-server with 1.5 or higher of brackets ?

thanks

blank page after build

so, when I perform all the tasks in the contributing.md file and successfully run grunt build, I fire brackets up with

brackets --port 3000 --proj-dir /workspace --supp-dir /workspace

and, with great excitement, I go to http://localhost:3000 ... I get ...

nothing

as in a blank page in the browser :(

what have I missed ?

not working

only express example working but cant save files ....

brackets git plugin can't find git

I wanted to build a development environment for our team , here is the idea, I installed openshift on our server, which holds our applications, and exposes ssh based git link, then I will install brackets-server some other place , and run.

Expected results would be, when I open brackets on browser, I would be opening a remote IDE, then I would use it's git plugin to pull source code from openshift server, then I use a remote terminal(maybe I have to write a plugin for brackets) to build my code where brackets is served, This way I don't have to configure the development everywhere, everyone would be developing online, and building on one machine, which serving brackets, when I push code to openshift, I can open the domain name openshift gave me.

But now, I can use git plugin with local brackets, but unable to use it in online version, it says unable to find "/usr/bin/git", something like that, well I do have up to date git installed already, everything working find.

Do you have any idea what's causing it? how do we solve it?

Implementing file download from brackets server

We are trying to implement a feature to download files from the brackets server to the local file system client.

It looks like we might be able to use the httpServer that is part of the brackets server implementation - but we are not quite sure how best to use this combined with the standard APIs and events in Brackets.

Has any one managed to do this already - or have ideas about how to best to go about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.