Nanobots Protecting Microbots
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

cendre

5.0.0 • Public • Published

Cendre

Look at the documentation on the official website.

Don't forget to save your configuration files before updating.

Very Quick Launch

# npm start cendre 

The default webfolder is located here :

'[..]/node_modules/cendre/www'

Quick Launch

Open the configuration file :

'[..]/node_modules/cendre/conf/config.nodejs'

Set the appropriate port. Create a file named "localhost" in '[..]/node_modules/cendre/conf/vhosts' and put the following lines in it :

exports.hostname = 'localhost';
exports.host = require('../base.nodejs')();
exports.host.root = '/var/www';

Then launch Cendre by typing this command :

$ npm start cendre

Develop

You can code your own dynamic pages. They have the .nodejs extension by default.

Here is the minimal code :

exports.mimetype = 'text/plain';
exports.encoding = 'utf-8';
 
exports.run = function(c, end)
{
    end('Hello world !');
};

It will return an UTF-8 encoded .txt file with "Hello world !" as content.

Changelog

V5.0.0 :

  • Added generator support.
  • Security fixes.

V4.2.0 :

  • Fixed regression on files routing.

V4.0.4 :

  • Fixed regression on get parameters.

V4.0.2 :

  • Added vhosts folder.
  • Added default vhost.
  • Server-Sent Events module rewrite.
  • Fixed URL rewriting.
  • Removed one_host parameter.

API/Features frozen on the V3.x branch.

V3.4.1 :

  • Improved Server-Sent Events module.
  • Removed cache module.

V3.3.4 :

  • Minor bug fixes.

V3.3.1 :

  • Fixed directory ordering.
  • Fixed JSON-RPC.

V3.3 :

  • Added c.root parameter.

V3.2 :

  • Added HTTP authentication.

V3.1 :

  • Unique host.
  • Multiple fixes.

V3.0 :

  • Added Server-Sent Events module.
  • Stability improvements.

API/Features frozen on the V2.x branch.

V2.6.2 :

  • OPTIONS method fixes.

V2.6 :

  • Added OPTIONS method support.
  • Synchronous JSON-RPC error handling.

V2.5 :

  • JSON-RPC fix.

V2.4 :

  • Code rewrite.

V2.3 :

  • New integrated session and cookie management.

V2.2 :

  • Added JSON-RPC in default www folder.
  • Removed "modified" in .nodejs files.
  • Removed revalidation action in cache module.

V2.1 :

  • Added memory usage limits.
  • Added GitHub Repository.

V2.0 :

  • Added HTTPS support.
  • Added file size limit before streaming.
  • Added custom HTTP headers.
  • Added static files caching.

API/Features frozen on the V1.x branch.

V1.7 :

  • Added default www folder with an "It works !" .html file.
  • Performance improvements.

V1.6 :

  • Avoid empty cookie, get or post parameter.
  • Fixed Content-Length and Content-Type headers on 304 response.
  • Added DELETE, HEAD and PUT method support.
  • Added c.rest array of pathname parameters.

V1.5 :

  • Changed disk_size parameter to KB instead of MB.
  • Added custom code execution at startup.

V1.4 :

  • Changed "content_type" to "mimetype" in .nodejs files.
  • Install folder automatically set.
  • Added "status" parameter to set custom HTTP error code in dynamic pages.
  • Added default MIME type for static and dynamic content.

V1.3 :

  • Performance and stability improvements.

V1.2 :

  • Include/Require bugfixes, absolute paths supported.
  • Added MIME types.

V1.1 :

  • 403 errors now masked as 404.
  • Added "private" to Cache-Control header with max-age parameter.

V1.0 :

  • First public version.

Prerequisites

  • Node.js 0.10.0 or newer.

install

npm i cendre

Downloadsweekly downloads

2

version

5.0.0

license

MIT

homepage

cend.re

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability