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

sling-server

v0.1.2

Published

Implements a RESTful server that is API-compatible with Apache Sling

Downloads

7

Readme

Entropy sling-server

The Entropy sling-server is a web server that provides a RESTful API which is largely compatible with Apache Sling. Unlike Apache's version, this server is implemented in Node.js; it is not backed by the JVM, OSGI, or any kind of Java Content Repository. For storage, it writes directly to JSON files on the filesystem, in a format which is very similar to what is described in the VaultFS specification, but using JSON in place of XML. For version control and replication, Git can be applied against the JSON files on the filesystem.

Installation

You can install sling-server as follows:

> npm install -g sling-server

Usage

Once installed, you can start up the sling-server as follows:

> sling-server /path/to/json-content

By default the service listens on port 4500, but this can be changed with the -p command line parameter .

Initializing content

There are several different ways to initialize content for your sling-server, including:

  1. Start issuing HTTP POST commands using the Sling protocol.
  2. Use a Sling content initialization tool, such as sling-server --init
  3. Download a .zip content package from another Sling instance. Unzip the package, and convert it to .json format using the sling-packager command line tool, available via NPM.

Example initialization using curl

The following command will create a two useful base folders at the path /content/my-site:

curl --request POST http://127.0.0.1:4500/content/my-site --data "../jcr:primaryType=nt:folder" --data "jcr:primaryType=nt:folder" --data "jcr:content/jcr:primaryType=nt:unstructured" --data "jcr:content/sling:resourceType=blacklight/edit/page/new"