Code Monkey home page Code Monkey logo

expi's Introduction

Expi Logo

expi

Modular, Minimalistic API Framework built with express.

Installation

Install expi using

$ npm install --save expi

Example

A working example can be found in the modules root folder.

$ node node_modules/expi/example/app.js

or

$ cd node_modules/expi && npm run example

TODO

  • Documentation for:
    • Module
    • Method
    • Route
    • Expi
  • Linting
  • Testing
  • Add new features
    • Dedicated session/authentication hook
    • Custom response schema
    • Extended response functionality
    • Clusterization
    • Extended versioning (Provide versioned modules under special routes for backward compatablility)
    • New layer ontop of route parameters
  • Expose all express functions without interfering with expi functionality
  • Proper releases
  • Build tasks
  • Handling preRoutes middleware while still returning 404 on module path without a route specified
  • Handle default errors, http codes, bad requests etc.

Documentation

A small overview over the functionality expi provides

Expi.Module(options)

Usage:

    let Module = require('expi').Module
    let module = new Module(options)

Configuration:

  • options
    • name: The name of the Module, this gets displayed as response.meta.name
    • version: The version of the Module, this gets displayed as response.meta.version
    • path: The base path of the module. This path is relative to the root path of the server.
    • ?middleware
      • preRoutes: Array of functions, these functions are plugged in as middleware before any routes and even before the internal expi-middleware
      • postRoutes: Array of functions, these functions are pluggin in as middleware after all routes and even after the internal expi-middleware (Caution: if expi-middleware is active, a response might be sent already!)
    • routes: Array of expi.Route instances
    • ?methods: Array of expi.Method instances

More documentation coming soon, for details take a look at the example in expi_root/example

(This module is in an early state, use with caution)

expi's People

Contributors

joschuaschneider avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.