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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-mljs

v0.0.0

Published

Yeoman generator

Readme

generator-mljs

A Yeoman generator for MLJS

Prequisites

To be able to generate an MLJS application using the generator you will need two things installed. The first is Yeoman. The second is the generator. Go ahead and take a moment to install them.

I'll wait.

$ npm install -g yo
$ npm install -g generator-mljs

There, that's better, isn't it? You'll also need MarkLogic installed. Fortunately, this is not painful.

Download MarkLogic from the faithful and trustworthy MarkLogic servers. Follow the simple instructions to get MarkLogic installed.

Your first App

To get started you'll need a content database and a REST database. Depending on your setup, an administrator may have already created one for you or you have admin rights and can create one yourself. Fortunately, if you do need to create one, the generator will create a simple setup to get you started.

Creating your own

You can skip this if there's already a server and db. When you type:

$ yo mljs

You are prompted with a series of questions. The first asks you to select your setup options. Choose "Create a content db and a rest service" from the menu.

You have a server and db

When you type

$ yo mljs

You will select "Nothing to do - REST service and content db exist."

Options

Option | Meaning ---------------|------------------------------------------ hostname | Your MarkLogic server hostname or IP address admin username | Required if you need to create a new REST service, optional otherwise admin password | Required if you need to create a new REST service, otherwise optional service name | The name you want to give your service so you can identify it. service port | The port the REST service should use content db name| The name of the content db to use or create.

Example:

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

You're using the fantastic Mljs generator.
[?] Select your setup options: Create a content db and a rest service
[?] What is your MarkLogic Server hostname? localhost
[?] What is your admin username? admin
[?] What is your admin password? x8kia30
[?] What's Rest Service Name? myotherservice
[?] What's the REST Service Port? 9997
[?] What's the content database name? (MyDb)

Where to Go from Here

Assuming everything went well, what you have at this point is a functioning Node/Express application with support for MLJS. What you need to determine is how you will use MLJS.

You can use MLJS from your Node (server side) code. In this case you will make calls to the rest service directly from your Node app.

You can also use MLJS from the browser. In this case your Node application is serving content and the queries execute directly against the MarkLogic server from your browser.

This generator currently supports both modes by both loading the NPM module for MLJS and the bower components for MLJS browser widgets.

MLJS Documentation

License

MIT