Code Monkey home page Code Monkey logo

moonboots_hapi's People

Contributors

chabou avatar gdibble avatar henrikjoreteg avatar joshua-mcginnis avatar latentflip avatar nlf avatar rluiten avatar secobarbital avatar spanditcaa avatar wraithgar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

moonboots_hapi's Issues

Typo in index.js

    getJsSource(function _getJsSource(err, css) {
        reply(css).header('content-type', 'text/javascript; charset=utf-8');
    });

'css' parameter should be 'js'

Serve static files?

I apologize for filing an issue about this, but I have... well, I haven't quite groked where all of these parts (&.js, Hapi, and Moonboots) fit together yet.

My question ought to be pretty simple: I have a set of JSON files stored under /public, but whenever my app requests them, it gets back the Moonboots bootstrap html. (the <!DOCTYPE html><style><script> thing.)

How can I return the actual files from under /public?

Major version breaking changes

Considering these:

  • allow at least pre and maybe handler config for all 3 routes
  • description, notes, tags override for all 3 routes

Configureable prefix

The prefix defaults to / right now but what if we want it to be somewhere else, specifically not a url local to the server (for instance if we have an automatic cdn configured for our server)

Is there interest in being a bit more windows platform smoothness ?

Firstly this is a nice little example project thank you.

On windows platform make is not something you can just depend on being available it can be non trivial to get one going if you have no prior experience with it. To lower the bar for windows platform it is very little effort to remove make as a dependency completely as what it is doing in this project is trivial.

I can create a pull request if you would like.

Hapi 8 compatibility

Is there a way to get this module to work with Hapi 8?

The example from the readme has this:

server.pack.require({moonboots_hapi: config}, function (er) {
    server.start();
});

..but I don't think server.pack exists any more. I got a bit further with:

server.register({register:require('moonboots_hapi'), options:config}, function (er) {
    ...
});

..but must have missed something as although the server started up without error, hitting the app page left me with a blank screen.

Test for development mode

Make sure the things in development mode are there and only in development mode (cache stuff mostly)

Update to hapi 2.0

Branch existing to legacy branch for now, update code to work in hapi 2.0. Party.

App path defines defaults

Now that we can have multiple moonboots instances, it would help to let the app path define the default routes for the css and js, that way one can once again rely on defaults if they were so inclined.

Handlers need access to moonboots app

Currently if you pass a handler into the config it does not have access to the currently scoped moonboots app initialized. Probably could/should or at least document how to get it from there?

Support Hapi 8.x

moonbots-hapi does not support the most recent Hapi 8.1.0 version

Graceful errors

If we're in development mode how about writing errors to the document instead of logging it, much like how original moonboots did in express?

css/js building as /{clientPath*}.ext

noticed this viewing page-source when running server on Mac OSX or Windows:

<!DOCTYPE html>
<link href="/{clientPath*}.css" rel="stylesheet" type="text/css">
<script src="/{clientPath*}.js"></script>

when running locally, file names above clickable/viewable and include compiled js or css (but clearly the file names are erroneous.)
pages viewable locally, but chokes in an Azure deployment.

Handling browserify errors in production

I'm not sure if this is a) a moonboots or a moonboots_hapi issue or b) only happens in production, but:

On andyet-platform we had an issue where a module was missing, so browserify build was failing (caused by missing dependencies in package.json effectively). This meant that both the hash in the filename, and the browserify output itself, was being inserted as "undefined".

As i understand it, in development this type of situation renders an error to the browser by inserting it into the JS output, but we presumably don't want to do that in prod. So it seems like this should basically be a hard-exception to me on the server, as if we can't render the js source, we have no app. Thoughts?

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.