Giter Club home page Giter Club logo

hapi-level-sample's Introduction

Sample API Built With NodeJS, HapiJS, LevelDB, Swaggerui

This is a sample API built with NodeJS, HapiJS, LevelDB, Swaggerui to demonstrate the ease and rapid prototyping abilities of HapiJS and LevelDB. It will also offer a boilerplate app for anyone looking to build an application with this technology stack. Data will be persisted in LevelDB between each run of the server.

This is an open sample, if you would like to see this project cover a specific area e.g. views, caching, different auth schemes, open an issue and I will try cover it. I aim to practice OPEN open source on this project, meaning individuals making significant or valuable contributions will be given commit access.

Feel free to raise an issue or contact me on twitter if you have any questions @johnbrett_. Beginners, feature requests and bug reports are welcomed.

Please star if you using this module so I know where to focus my time spent on open source work.

To build and run:

    $ git clone https://github.com/johnbrett/hapi-level-sample.git
    $ cd hapi-level-sample
    $ npm install
    $ node index.js

You can then view the API documentation generated by Swaggerui by visiting: http://localhost:8080/documentation

If you want to sample authentication for the api, run with:

    $ AUTH=required node index.js

Authentication is disabled for the create user route, so you can create a user with an access token of your choosing to specify when querying the other routes.

Node Modules created in the making of this project

  • hapi-level : Utility module to ease integration of Hapi and LevelDB

  • hapi-auth-bearer-token : Authorization module for HapiJS based on the Bearer authentication scheme.

  • calibrate : DRY to create consistent responses, with error handling

hapi-level-sample's People

Contributors

johnbrett avatar

Watchers

James Cloos 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.