New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sling-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sling-server

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

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

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:

  • Start issuing HTTP POST commands using the Sling protocol.
  • Use a Sling content initialization tool, such as sling-server --init
  • 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"

FAQs

Package last updated on 06 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts