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

lork

v1.1.8

Published

A framework for building backend applications

Readme

Lork Framework

Lork is a lightweight and flexible Node.js framework designed for building backend applications. It provides essential features like routing, session management, and authentication, all while giving you the freedom to implement custom logic.

Features

  • Custom Routing: Define routes effortlessly.
  • Session Management: Built-in support for session handling, including memory and custom stores.
  • Authentication: Easily integrate authentication systems.
  • Response Handling: Custom response methods for sending JSON, HTML, and cookies.
  • Lightweight: Minimal footprint, focused on core functionalities.

Installation

To install Lork, use npm:

npm install lork

Getting Started

Here's a simple example to get you started:

const { Lork } = require('lork');

const app = new Lork();

app.get('/', (req, res) => {
  console.log(req.fields); // your body fields are stored here.
  console.log(req.files); // your files are stored here.
  res.send('Hello, world!');
});

app.listen(3000, () => {
  console.log('Server is running on http://localhost:3000');
});

Middleware

Session Middleware

To use session management:

const { session } = require('lork');

app.use(session({
  cookie: {
    key: 'connect.sid',
    secretKey: 'your-secret-key',
    maxAge: 3600000, // 1 hour
  },
  store: /* your store options here */
}));

Authentication middleware

const { LocalAuth } = require("lork");
const User = require("path/to/your/user/model");

const auth = LocalAuth({User: User});
app.post("/login", auth.authenticate(), (req, res) => {
  if(req.session.userId){
    res.json({msg: "successfully authenticated"});
  }else{
    res.status(400).json({msg: "bad request"});
  }
});

Response Methods

Lork provides several methods for response handling:

  • res.send(data): Send plain text response.
  • res.json(data): Send JSON response.
  • res.render(fileName): Render an HTML file from the views directory.
  • res.status(statusCode): Set response status code.
  • res.redirect(url): Redirect to a different URL.
  • res.cookie(options): Set a cookie.
  • res.signedCookie(options): Set a signed cookie.
  • res.deleteCookie(cookieName): Delete a cookie.

Contributing

Contributions are welcome! This software needs some improvements. Please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Thanks to allah and to the open-source community for inspiration and resources