Git Product home page Git Product logo

absinthe's Introduction

Absinthe

Ἀψίνθιον. A highly integrated, advanced, extensible and cluster-ready server.

Absinthe is a pure and beautiful boilerplate to kickstart web-app development. Absinthe is released under non-restrictive conditions and is extremely extensible. It is an abstraction of some of our core technologies and may be considered mature. It sports in-flight compression (gzip, deflate), stream caching and a hilarious performance.

Installation

As the HTTP port is below 1234, Absinthe has to be run with root-priviliges.

Clone Absinthe, setup using npm install and you're ready to go. Absinthe is appropriate as a static server if you plan to only deliver plain websites; fill up /static with your content and go crazy. If you plan on extending Absinthe according to your needs, read on.

Architecture

controller [kəntrolər]. Extensions which serve data and may include logic routines.
logic [lɑdʒɪk]. Extensions which do not serve data and exclusively contain logic routines.

We've included an example controller and an example logic. If you fire up the server right now and head to "/start" you'll be greeted by some sweet Hello World! sugar. This is served by a controller referencing a routine inside a logic.

Structure

When you fire up Absinthe, it searches for both controllers under /controllers and logic under /logic. Logics can arbitrarily export any kind and type of data and functions. The same applies to controllers with the exception that they have to export both a paths map (an array) which includes all paths (e.g. /start, /messages et al.) to which the controller applies to. Every controller exports a handler function which is called with the servers request and response; the third parameter is a sugar for request.url.

You can talk to any controller or logic with controller.* and logic.*, whereas the filename specifies the name under which an extension is registered internally. (e.g. start.js will be namespaced as controller.start.*)

チャレンジして失敗ことを恐れるよりも、何もしないことを恐れろ。

absinthe's People

Contributors

19h avatar

Watchers

 avatar  avatar  avatar

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.