npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

y-brackets-server

v0.5.11

Published

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

Downloads

2

Readme

Brackets Server

!!IMPORTANT!! For a * reason, I removed the copy/cut function. if you want to use hosted brackets, please npm install brackets instead.

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 y-brackets-server -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.