Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Node.js based server consisting of loosely coupled components with low dependencies, multiprocess support and good test coverage.
JavaScript
branch: master
Failed to load latest commit information.
lib empty comment
tests empty comment
.buildpath empty comment
.gitignore empty comment
.project empty comment
README.md test commit 10m
index.js empty comment
license.txt empty comment
package.json empty comment

README.md

jserver

Node.js based server consisting of loosely coupled components with low dependencies, multiprocess support and good test coverage.

JServer is Node.js based consisting of loosely coupled components with low dependencies, multiprocess support and good test coverage. This Node.js based server tries to provide useful server functionality for your application with minimal dependencies both within the library and to external components. All functionality has associated unit tests to provide robust platform to built on.

Guiding principles

  • Dependencies are avoided at all cost, nothing outside core Node.js modules is used in core
  • You pay in terms of performance only for exactly those features what you need
  • 100% test coverage to provide robust platform to built on

Features

  • Master/workers architecture for stability and to take advantage of multiple CPU cores
  • Auto-restart of dead workers
  • Basic routing with emphasis on performance and minimal memory allocations
  • No dependencies outside Node.js core modules
  • OO-style instantition which allows you to create multiple servers in single process
  • MongoDB connectivity
  • File serving support (mainly useful for .js files as you'd use Nginx for any data which is not subject to same-origin limitations)
  • DB based session support with drivers for Redis (preferred) and MongoDB

Components

  • FileCache - File serving suppport. No dependencies! (even not dependent on JServer)
  • Filter - Type/schema based input filtering support. No dependencies!
  • File util - File finding etc. mainly for deployments and scripting (sync)
  • JServer - Core HTTP(S) server supporting master/worker architecture out of the box. No dependencies!
  • MongoDBC - MongoDB connectivity. Uses mongodb-native driver (=the only dependency).
  • Redirect - Simple redirect support (URL+status code). No dependencies!
  • Session - Session handling with storage drivers for Redis and MongoDB. (dependencies: only mongodb-native and redis)

About Components

  • Note that a goal in all components is to make them as isolated as possible
  • For example MongoDBC connectivity and File Cache can be used without JServer itself

Install

To run unit tests

  • Make you sure have MongoDB and Redis running since some tests use those
  • node tests/all.js
  • Open tests/index.html in browser
Something went wrong with that request. Please try again.