Giter Site home page Giter Site logo

kringle's Introduction

kringle

A basic, dependency-free, Node.js web server with support for multiple hosts, security, and extensions.

NOTE: kringle is a work in progress. It currently has no support for https, but will in the coming weeks. To install, the simplest way is via npm:

npm install kringle

or

sudo npm install --global kringle

To daemonize kringle on a Unix-like OS, an init script will have to be created. This is also in the kringle todo queue. For now, you can manually start the server by simply running kringle from the command line. However, this is not particularly useful for two reasons: One, it will run in the foreground occupying your terminal window, and two, you'll have to start it up each time you want to run it--not very practical for a web server. Instead you can add the following line to your /etc/rc.local file to automate kringle at startup.

su kringleuser -c "/path/to/kringle &"

where kringleuser is the name of whichever user on your system you'd like to run kringle as. This user will have to be created beforehand manually; kringle will not do it for you.

& will send the process to the background and is very important, because without it, your computer will hang at startup until the process is complete, which it will not be, because it's a web server. Please note, however, that /etc/rc.local is considered an outdated way to daemonize a process and may not be supported by certain Linux distros. Check your documentation.

kringle's People

Watchers

James Cloos avatar Keith Petrino avatar

kringle's Issues

server serving a 500 when it should serve a 404

this relates to line 174, currently:

serve(res, {code: 500, message: ''}, getCustomStatus('html', 500, host, filter), {}, host, filter);

Instead, this should read:

code = error.code == 'ENOENT' ? 404 : 500;
serve(res, {code: code, message: getCustomStatus('message', code, host, filter)}, getCustomStatus('html', code, host, filter), {}, host, filter);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.