GithubHelp home page GithubHelp logo

hapijs-edge / hapi-plugins.com Goto Github PK

View Code? Open in Web Editor NEW
51.0 6.0 14.0 1.27 MB

Searchable database of hapi plugins!

Home Page: https://hapi-plugins.com

License: ISC License

Makefile 0.84% JavaScript 89.33% CSS 3.50% HTML 5.61% Shell 0.73%

hapi-plugins.com's Introduction

JavaScript

Build Status

Introduction

hapi edge book cover

Hapi-Plugins.com is a searchable database of Hapi.js plugins. It was made for the book Developing a hapi Edge by:

This application was built from the beginning as open-source. Go ahead: Fork it and make it better!

Topics

Quick Start

git clone https://github.com/hapijs-edge/hapi-plugins.com.git
cd hapi-plugins.com
npm install
npm run start

Then, open your browser to http://localhost:8080 to view your local copy of the web application. The first time a query is searched, it will take a few seconds and subsequent re-searches will feel instantaneous after the cache is warmed up.

Options

Environment Variables

  • PRODUCTION
    • The PRODUCTION=1 npm run start env variable will disable console output of route table and good runtime statistics.
  • DEVELOPMENT
    • The DEVELOPMENT=1 npm run start env variable will disable the public mongodb database and attempt to connect to a local mongodb.

Config.json

  • port
    • The port to run the web server (defaults to 8080).
  • apiPort
    • DEPRECATED: The port to run the api server (defaults to 8088).
  • database
    • mongodb
      • host
        • The mongodb host connection string (defaults to public mongodb).
      • username
        • The username with which to connect to the host.
      • password
        • The password with which to connect to the host.

Troubleshooting

The search results are always empty

If the search results are empty and you are using the public mongodb instance, most likely some troll deleted everything. To repopulate visit HOST + '/admin/plugins/populate/source' in your browser where HOST is how you normally connect to hapi-plugins (default is http://localhost:8080).

License

The ISC License

Copyright (c) 2015, Lloyd Benson, Daniel Bretoi, Van Nguyen, Wyatt Preul

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

hapi-plugins.com's People

Contributors

danielb2 avatar geek avatar nvcexploder avatar thegoleffect avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hapi-plugins.com's Issues

Performance Optimizations

On search, it is iterating through the results and making an HTTP request to get updated downloaded counts. If this was cached and stored with the plugins, the search function could be significantly faster.

Looking for someone to take this over.

Branches for file status at each chapter?

Hi there

I've just bought 'Developing a Hapi Edge' and am making my way through it, great so far!

I work with a lot of people who are relatively new to coding (as a mentor at Founders & Coders) and although I know this book isn't meant for beginners, it's not always apparent where code changes are being made.

It might make the book more accessible to a wider audience if you had a branch for each chapter, including the files that have been built up throughout that chapter. This is because code written in chapter 2 will have been changed throughout the book so there isn't always a reference point near the beginning.

If you're interested in implementing this, I'm happy to help out. Just a thought ๐Ÿ˜Š

NPM API models

need wreck models for gathering npm info, stats by module name

Book Issue - Route prerequesites example

Not sure if this is the right place for this but in the section of chapter 3 discussing route prerequsites, the code example shows two arrays for pre but I think it's supposed to be mixed with an object to demonstrate the serial/parallel difference.

Parsing error Unexpected token when using async.

I am using eslint-config-hapi also
Parsing error: Unexpected token is generated from the function =>
It has something to do with the async
const create = async (request, reply, sequelizeModel,createObject) => {
code...
}

GET '/': mobile width issue

when you resize browser to mobile widths or view on mobile, columns don't shift properly due to the float: right. Need to do it the "correct" way.

Plugin drilldown page

Still todo:

When user clicks on a search result, it should load a page displaying more information about the plugin:

  • readme
  • versions
  • stats

What other info should it include?

PostgreSQL models

plugins and user, likes go in user

ORM library TBD:

  • Knex
  • Bookshelf
  • Sequelize
  • JugglingDB

error running code

I bought the book and tried to install the code and run it (I am running windows). I get the following error:

c:\server\www\hapi-plugins.com>npm run start

[email protected] start c:\server\www\hapi-plugins.com
node index

module.js:339
throw err;
^

Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (c:\server\www\hapi-plugins.com\node_modules\mongoose\lib\drivers\node-mongodb-native\objectid.js:8:16)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node index
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node index'.
npm ERR! This is most likely a problem with the hapi-plugins.com package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index
npm ERR! You can get their info via:
npm ERR! npm owner ls hapi-plugins.com
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:\server\www\hapi-plugins.com\npm-debug.log

c:\server\www\hapi-plugins.com>

Please help.

Thanks,
Scott

Website is down

I've noticed the hapi-plugins.com website is down and is returning a 502 bad gateway nginx error.

Setting up routes for different labels and with different options

I just got done reading the Developing a hapi Edge book, and its a great book! I had a question about loading routes with Confidence though

In some examples in the book, you setup the API and HTTP servers on different ports, and thats what I'm trying to do. Im also using ConfidenceJS to manage the config.

In my confidence.json file, I'm trying to load two different route files. One will have the api label selected, which will also have a prefix setup in the options to prefix all the route paths, and bind it to the port assigned to the api label inside the connections settings. The other will have the http label, which should bind it to the http port.

I didn't see anything in the book that shows how to split the routes up so you can apply different settings/labels to them via confidence. If they cant be split up, then how can I assign different labels and options?

When I run the dist/app.js via node, it starts up and doesn't throw any errors, however, it doesn't bind to either the http port (8001), or the API port (8000), and no routes are loaded. But when I remove the http-routes plugin from the confidence config, and restart the service, it starts fine and listens on both ports, but only the API routes are loaded (obviously)...

Im not sure what im doing wrong here. My goal is just to have different routes loaded for different ports/labels, and with different options (So I can apply a prefix to the API routes)

Func to Poll NPM and auto populate modules

using #5, need a function that grabs npm modules that match following criteria:

  • hapi prefix (module name starts with hapi-)
  • hapi, hapijs, hapi.js, hapi-plugin, hapi-* in keywords

Use this to auto populate the database(s) ... when the models are finally completed.

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.