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

vorka

v0.0.2

Published

A new hybrid web/app framework

Downloads

2

Readme

Vorka

An experimental web framework for Node.js

npm version Build Status Code Climate Dependency Status devDependency Status Coverage Status Codacy Badge

Installation

npm install vorka

Why Vorka?

Vorka was a fresh look at how HTTP works in Node.js, and an attempt at building a small DSL around it to support simple sites. I noticed in rudimentary benchmarking tests that a Node.js HTTP server's bootup time compared to Connect/ExpressJS was significantly faster (57ms vs 120ms on a 2010 MacBook Air 11"). I explored this concept a bit more, and came up with a project, which is named after the song "Vorka" by the Hidden Orchestra.

It's essentially a sandbox for experimentation.

Usage

Here is a simple example of returning some inline HTML with a 200 status when making a GET request to /

var app = require('vorka');

app.get('/', function (req, res) {
	res.html(200, '<html><head><title>Sample HTML</title></head><body><h1>Hello</h1></body></html>');
});

app.listen(3000);

Vorka supplies a simple HTTP server that is extended with some helper functions:

DSL helper functions

HTTP method helper functions

Similar to Sinatra in Ruby or Express in Node, we provide a simple DSL for adding routes and functions based on their HTTP method. Below is an example for a GET request for an app.css file at /app.css

e.g.

app.get('/app.css', function (req, res) {
	res.css(200, 'body { background: red; }');
});

The same pattern exists for the following HTTP methods:

- POST 		(app.post)
- PUT 		(app.put)
- PATCH		(app.patch)
- DELETE 	(app.delete)
- HEAD 		(app.head)

Response helper functions

There are also HTTP response helper functions that populate the HTTP headers for common formats:

- HTML
- CSS
- JavaScript
- plain text

e.g.

app.get('/app.js', function (req, res) {
	res.js(200, 'alert("hi");');
});

Contributing to Vorka

We welcome contributions to Vorka. Here are some useful tips:

  • We use JSHint to help keep the code formatting consistent
  • We write and run tests using Mocha
  • We currently benchmark manually, but will be bringing in a benchmarking suite soon

Licence and rights

© 2015 Anephenix Ltd. Vorka is licenced under the MIT license. - See LICENSE for details.