Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including brackets with all npm packages installed. Try it out:

var brackets = require("brackets")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

brackets v0.5.1

Brackets Server is a server for providing hosted version of the popular code editor Brackets.

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

All arguments are optional.

Short OptionLong OptionDefault ValueDescription
-p <prot>--port6800TCP port on which Brackets server is listening.
-j <dir>--proj-dir~/ProjectsRoot directory for projects. Directories above this root cannot be accessed.
-s <dir>--supp-dir~/.brackets-srvRoot directory for Brackets supporting files such as user extensions, configurations and state persistence.

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/");

Contributing

Please see CONTRIBUTING.md

License

(MIT License)

Copyright (c) 2012 Boyan Rabchev boyan@rabchev.com. 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.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free