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

open-in-editor-server

v0.2.0

Published

Tool which runs a server to open files in a text editor.

Downloads

8

Readme

open-in-editor-server

A wrapper for express-open-in-editor middleware to simplify running a server to open files in a text editor.

Installation

Via npx (recommended, supported in npm since 5.2.0)

To skip global installation and get updates automatically in future you can use beautiful npx command and directly run the binary:

> npx open-in-editor-server

In other words, you don't need to install anything. Just use it.

Via normal npm installation

You can always install it as a normal npm package:

> npm install -g open-in-editor-server

And run globally installed binary:

> open-in-editor-server

Usage

Run in the directory of your project providing your text editor name as an argument.

> cd path/to/my-project
> npx open-in-editor-server -e code
Server is running on port 6437...

You are now running a server on a default port 6437 with VSCode configured to open files. For the list of supported editors as well as any other possible options and their values you can use --help:

> npx open-in-editor-server --help

You need to have VSCode binary preinstalled. Same for other text editors. Information about how to do it you can usually find in the corresponding text editor's docs.

Try opening URL having file param with a relative path to a file inside the project directory.

http://127.0.0.1:6437/?file=/src/my-file.js

Behind the scenes the server will run a shell command passing path to the file to VSCode binary. Something like this:

> code path/to/my-project/src/my-file.js

That's it. Your text editor should open this file.

Normaly you don't open such URLs manually, but rather make calls from your JavaScript code to this server. Whatever use-case you have, have fun!