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

@jsenv/exploring-server

v3.11.0

Published

[![npm package](https://img.shields.io/npm/v/@jsenv/exploring-server.svg)](https://www.npmjs.com/package/@jsenv/exploring-server) [![build](https://travis-ci.com/jsenv/jsenv-exploring-server.svg?branch=master)](http://travis-ci.com/jsenv/jsenv-exploring-s

Downloads

176

Readme

jsenv exploring server

npm package build codecov

Introduction

@jsenv/exploring-server starts a server creating an html page listing your project files. Each link goes to an url where your JavaScript file will be executed. Thanks to this, any file or your project can become an entry point. You can use it to debug a file in isolation or even to create a storybook.

It has the following exports:

  • startExploringServer

How to use

To understand how to use jsenv exploring server let's use it on a "real" project. We will setup a basic project and start an exploring server inside it.

Steps to start exploring server on a basic project

  1. Create basic project file structure

    — see ./docs/basic-project

  2. Install dependencies

    npm install
  3. Start the exploring server

    node ./start-exploring-server.js

Using the exploring server

A first main server will start. This one is used by the whole jsenv project. A second server will start. That's the one we're interested in right now. The url http://127.0.0.1:3456 is logged in your terminal.

Once server is started you can navigate to http://127.0.0.1:3456 and you will see an html page listing the files you can explore.

exploring server chome screenshot

  • If you go to http://127.0.0.1:3456/src/hello.js page displays Hello world. It shows that if your file execution renders something, you can see the effect in your browser.
  • If you go to http://127.0.0.1:3456/src/text.js nothing special will happen because /src/text.js is just a module with an export default. It shows that even if your file do not render anything, you still can use this functionnality to debug your file.

Here is a gif showing me browing basic project files:

recording of me exploring a project using chrome

If you want to know more about startExploringServer, there is a dedicated page for that. — see startExploringServer documentation

Installation

npm install --save-dev @jsenv/[email protected]
yarn add @jsenv/[email protected] --dev