Sign inDemoInstall


Package Overview
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies



<source srcset="" media="(prefers-color-scheme: dark)"> <img src="

Version published
Weekly downloads
decreased by-24.72%
Weekly downloads



Coverage Status npm

The Mojolicious real-time web framework for Node.js. Written in TypeScript. Meticulously designed for hypermedia-driven backend web services using all the latest JavaScript features.

If you want to stay up to date on the latest developments join us on IRC or Matrix.


  • 3x faster than Express.js and 15x faster than Mojolicious.
  • A real-time web framework, allowing you to easily grow single file prototypes into well-structured MVC web applications.
    • Powerful out of the box with RESTful routes, WebSockets, plugins, commands, logging, templates, content negotiation, session management, form and JSON validation, testing framework, static file server, cluster mode, CGI detection, first class Unicode support and much more for you to discover.
  • A powerful web development toolkit, that you can use for all kinds of applications, independently of the web framework.
    • High performance HTTP and WebSocket client/server implementation with support for HTTPS/WSS, cookies, redirects, urlencoded/multi-part forms, file uploads, JSON/YAML, HTML/XML, mocking, API testing, HTTP/SOCKS proxies, UNIX domain sockets and gzip compression.
    • HTML/XML parser with CSS selector support.
  • No frontend framework, mojo.js is for the backend.
  • Written in TypeScript, with very clean class and async/await based APIs.
  • Very few dependencies, to avoid supply chain attacks and allow for "Perl-grade" long term support and backwards compatibility.
  • Fresh code based upon decades of experience developing Mojolicious and Catalyst, free and open source.


All you need is Node.js 18.0.0 (or newer).

$ npm install @dramaorg/ipsum-harum-ipsa

Maybe take a look at our high quality spin-off projects @mojojs/dom, @mojojs/path, @mojojs/pg and @mojojs/template.

Getting Started

These four lines are a whole web application.

import mojo from '@dramaorg/ipsum-harum-ipsa';

const app = mojo();

app.get('/', ctx => ctx.render({text: 'I ♥ Mojo!'}));


Use the built-in command system to start your web server.

$ node index.mjs server
[77264] Web application available at

Test it with any HTTP client you prefer.

$ curl
I ♥ Mojo!

Duct Tape for the Web

Use all the latest Node.js and HTML features in convenient single file prototypes like this one, and grow them easily into well-structured Model-View-Controller web applications.

import mojo from '@dramaorg/ipsum-harum-ipsa';

const app = mojo();

app.get('/', async ctx => {
  await ctx.render({inline: inlineTemplate});

app.websocket('/title', ctx => {
  ctx.plain(async ws => {
    for await (const url of ws) {
      const res   = await;
      const html  = await res.html();
      const title ='title').text();
      await ws.send(title);


const inlineTemplate = `
  const ws = new WebSocket('<%= ctx.urlFor('title') %>');
  ws.onmessage = event => { document.body.innerHTML += };
  ws.onopen    = event => { ws.send('') };

Want to know more?

Take a look at our excellent documentation!



Last updated on 19 Jun 2024

Did you know?

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.


Related posts

SocketSocket SOC 2 Logo


  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc