outmoded / hapijs.com Goto Github PK
View Code? Open in Web Editor NEWThe hapijs.com website
License: Other
The hapijs.com website
License: Other
There's a couple of typos I've spotted:
By using hapi we were able to easily let our code evolve with our company and use existing feature without re-inventing the wheel.
Feedient
@svnlto switched us from Express to hapi and with that one change, our server code became manageable and self-descirbing. It has been a boon to the productivity we’ve had at Hoodie and it we have not encountered any production issues since 2.0.
I'm not sure if they're transcribed exactly from the original quotes and you've left them as-is for a purpose. If not, I can open a PR.
We are compiling a list of companies or products using hapi for a few reasons:
What we need from you:
Please add a PR with your company information here: https://github.com/hapijs/hapijs.com/blob/master/lib/community.js
Hapi v7.0 changed the way how views are configured. This page needs to be updated: http://hapijs.com/tutorials/views
Doesn't make sense for the event to take over the front page. It needs its own page. @nvcexploder @nlf
It's usually not advisable to compress jpegs as they're compressed already (http://webmasters.stackexchange.com/questions/8382/gzipped-images-is-it-worth).
A minor improvement to the docs might be to not use a jpeg here when demonstrating the lookupCompressed option. CSS, JS, or HTML files would be better candidates:
Company name: American Bible Society
Product name or use case: Bible API
Is it in production or development? Development
Contact information for further questions: [email protected]
Contact information for security alerts: [email protected]
Link to logo if we can showcase your company on the new site: http://www.americanbible.org/img/[email protected]
User quote (with attribution) about your hapi user experience (up to 300 characters): Hapi has been a great foundation for our api project. It provides a very rich interface to build on, and we've enjoyed building with it more than Express.
Currently the only page titles I’m receiving are the URLs of the pages themselves. It might be better if there were better page titles, e.g. “Tutorials - Hapi.js”.
This is the information requested:
Please let us know if you need anything else.
I just browsed the website and I kinda missed a tutorial on helper methods. It doesn't have to be its own page, maybe as a subsection for the views page.
What would be a good example to include in the documentation?
This change in the github urls breaks the footer core team link.
Company name: Concrete
Product name or use case: Concrete
Is it in production or development? Development but going into production in Jan 2015
Contact information for further questions: Andy Clarke ([email protected])
Contact information for security alerts: Andy Clarke ([email protected])
Link to logo if we can showcase your comply on the new site: attached
User quote (with attribution) about your hapi user experience (up to 300 characters):
Hapi has allowed us to dramatically accelerate our api design and construction, and now underpins our global collaboration platform. Hapi has made our engineers more productive, enthusiastic and engaged within the community.
In the authentication tutorial (http://hapijs.com/tutorials/auth) it is said:
Next, we register the plugin, which creates a scheme with the name of basic.
This is done within the plugin via plugin.auth.scheme().
However there is no call to plugin.auth.scheme
or server.auth.scheme
.
Am I missing something?
Thanks.
Quoted from http://hapijs.com/tutorials:
handler: function (request, reply) {
reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
}
Note that we URI encode the name parameter, this is to prevent content injection attacks. Remember, it's never a good idea to render user provided data without output encoding it first!
While I agree that rendering user provided data is often a risk, I have big doubts whether the presented method it is really a good idea. It means garbling possibly valid user input such as John "Johnny" Doe
or Владимирь
. Shouldn't Content-Type: application/json
be enough to guard against HTML/JS injection?
Should rework the container a bit to compensate. Low priority.
Should document the various things hapi does/has to facilitate creating a secure application.
See hapijs/hapi#1951
The #hapi channel on freenode demands a way to buy t-shirts and stickers with Hapi logos!
Hello!
The getting started tutorial http://hapijs.com/tutorials isn't working with node 0.10.33, hapi 8.0.0, and good 5.0.0.
Here's the error:
/Users/adamhickey/HapiTutorials/myproject/node_modules/good/node_modules/hoek/lib/index.js:663
throw new Error(msgs.join(' ') || 'Unknown error');
^
Error: Invalid monitorOptions options reporters is required
at Object.exports.assert (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/node_modules/hoek/lib/index.js:663:11)
at Object.exports.assert (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/schema.js:11:10)
at new module.exports.internals.Monitor (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/monitor.js:53:12)
at Object.exports.register (/Users/adamhickey/HapiTutorials/myproject/node_modules/good/lib/index.js:10:19)
at /Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/lib/plugin.js:235:14
at iterate (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/node_modules/items/lib/index.js:35:13)
at Object.exports.serial (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/node_modules/items/lib/index.js:38:9)
at internals.Plugin.register (/Users/adamhickey/HapiTutorials/myproject/node_modules/hapi/lib/plugin.js:221:11)
at Object.<anonymous> (/Users/adamhickey/HapiTutorials/myproject/server.js:23:8)
at Module._compile (module.js:456:26)
And here's server.js:
var Hapi = require('hapi');
var Good = require('good');
var server = new Hapi.Server();
server.connection({ port: 3000 });
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
reply('Hello, world!');
}
});
server.route({
method: 'GET',
path: '/{name}',
handler: function (request, reply) {
reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
}
});
server.register(Good, function (err) {
if (err) {
throw err; // something bad happened loading the plugin
}
server.start(function () {
server.log('info', 'Server running at: ' + server.info.uri);
});
});
@hueniverse I know you care like crazy about security and must already have a process for this. If I can help, I'd be happy to.
I'm implementing a Rest Api and i'm wondering where filtering should happen. In code: by returning the Whole Object and the filtering or by filtering in sql?
Thanks for the help.
I am really happy to show that MovingWorlds is using Hapi :)
Company name: MovingWorlds
Who am I?: Farrin A. Reid, Director of Engineering at MovingWorlds
Product name or use case: MovingWorlds, We use Hapi to power our backend, frontend, and other internal services
Is it in production or development?: The product is running in production.
Contact information for further questions: [email protected]
Contact information for security alerts: [email protected]
Link to logo if we can showcase your company on the new site: https://s3.amazonaws.com/movingworlds-assets/images/MWlogo-square-Blue-Large.png
User quote (with attribution) about your hapi user experience (up to 300 characters): hapi, with its configuration-centric approach, integrated authentication, easy to use and powerful validations, and intelligent API design, allowed us to launch publicly much faster than anticipated. Maintenance/upgrades have also been a breeze, I would highly recommend hapi to anyone starting out or looking to switch web frameworks.
Thanks!
This is a big plus to using Hapi.js but the information on how to use Hapi.error etc. seems a bit scattered atm.
I noticed that when i pick another version for Reference under the API tab, that the top level one disappears and I can't get back to it unless i click on API. At the time I was looking 6.7.1 was the top, so if I pick something else I should see that option still. The top most level one I could see after making another selection was 6.6.0. Let me know if you need more specifics about browser etc, but for now I will assume I am not the only one that sees this.
Currently it seems the best place to find changes to Hapi is in the milestone filter, eg.
https://github.com/hapijs/hapi/issues?q=milestone%3A8.1.0
It'd be nice to have the milestones available from http://hapijs.com/updates
Hi, My name is Rich Sadowsky. I am responding to your request that we provide usage info by opening an issue here. I'm Chief Architect Cloud at Jibo, Inc., makers of the world's first family robot. I want to be clear that I am still evaluating Hapi and have not officially started development with it. But my instincts tell me this is the right framework. I am eager to evaluate 8.0 but currently npm is giving me 7.5.2. I'll check 8 out from here for the next phase of my eval.
Company name: Jibo, Inc.
Product name or use case: Jibo is the name of the company and the product. It's a social robot. It makes use of many services in the cloud. As Chief Architect Cloud, I am in charge of selecting technologies for the cloud components of the infrastructure.
Is it in production or development? Hapi is still under evaluation but is the leading candidate for a framework. Therefore we are still in development.
Contact information for further questions: [email protected] or [email protected]
Contact information for security alerts: [email protected]
Link to logo if we can showcase your company on the new site: our corporate website is at http://www,myjibo.com. Please do not include the logo yet.
User quote (with attribution) about your hapi user experience (up to 300 characters)
I decided to evaluate hapi after reading about it and seeing the corporate logos of the other users. We are expecting Jibo to be a massive success and want to build a system that will scale quickly. I've used Express and Restify in prior projects. At the beginning of each new project I research what is available and select the best product.
^^^^ I will have a better quote once I start development.
I think that the header tags under API should be anchors like they are on the GitHub readme. It's difficult to give someone a link right to a method or property without that feature. They are in the side menu, but I find myself just doing searches on the page.
Hey!
The Authentication tutorial gives the error: Invalid server options 3000, value must be an object.
Copy pasted from tutorial:
var Bcrypt = require('bcrypt');
var Hapi = require('hapi');
var Basic = require('hapi-auth-basic');
var server = new Hapi.Server( 3000 );
var users = {
john: {
username: 'john',
password: '$2a$10$iqJSHD.BGr0E2IxQwYgJmeP3NvhPrXAeLSaGCj6IR/XU5QtjVu5Tm', // 'secret'
name: 'John Doe',
id: '2133d32a'
}
};
var validate = function (username, password, callback) {
var user = users[username];
if (!user) {
return callback(null, false);
}
Bcrypt.compare(password, user.password, function (err, isValid) {
callback(err, isValid, { id: user.id, name: user.name });
});
};
server.register(Basic, function (err) {
server.auth.strategy('simple', 'basic', { validateFunc: validate });
server.route({ method: 'GET', path: '/', config: { auth: 'simple' } });
});
That error can be fixed by changing:
var server = new Hapi.Server( );
server.connection({ port: 3000 });
Which results in a new error:
/Users/adamhickey/Prototype/node_modules/hapi/node_modules/hoek/lib/index.js:663
throw new Error(msgs.join(' ') || 'Unknown error');
^
Error: Missing or undefined handler: GET /
at Object.exports.assert (/Users/adamhickey/Prototype/node_modules/hapi/node_modules/hoek/lib/index.js:663:11)
at new module.exports.internals.Route (/Users/adamhickey/Prototype/node_modules/hapi/lib/route.js:35:10)
at internals.Connection._addRoute (/Users/adamhickey/Prototype/node_modules/hapi/lib/connection.js:342:17)
at internals.Connection._route (/Users/adamhickey/Prototype/node_modules/hapi/lib/connection.js:334:18)
at internals.Plugin._apply (/Users/adamhickey/Prototype/node_modules/hapi/lib/plugin.js:432:14)
at internals.Plugin.route (/Users/adamhickey/Prototype/node_modules/hapi/lib/plugin.js:407:10)
at /Users/adamhickey/Prototype/server.js:30:12
at done (/Users/adamhickey/Prototype/node_modules/hapi/node_modules/items/lib/index.js:30:25)
at Object.exports.register (/Users/adamhickey/Prototype/node_modules/hapi-auth-basic/lib/index.js:15:5)
at /Users/adamhickey/Prototype/node_modules/hapi/lib/plugin.js:235:14
There should be link for hapi day videos somewhere on hapijs.com, probably in help section?
Hi,
I've been looking for examples of Hapi projects that demonstrate how to structure an an rest api service.
By structure, I mean where to put different components of the app. To make it easier to test and extend.
Any help here would be appreciated.
It would be nice if all of these pages can be styled like the site and be pulled in automatically from the github versions.
Hey guys,
I made a project using hapi:
Http://Github.com/smaxwellstewart/hapi-dash
Would be brilliant if you featured it on the site.
Thanks for all the hard work making many devs hapi. It is brilliant framework, and supported really well.
Simon
Hello,
Trying to run hapijs.com, after npm install and make I get this response when visiting /
401
{ message: 'Bad credentials',
documentation_url: 'https://developer.github.com/v3' }
I would like a page that collects all the open issues labelled either 'help wanted' or 'new contributor' and shows them in two lists.
Hi guys we would like you to know that we are using Hapi in a few services of our platform. Thanks so much for your work.
We offer films and tv shows on-demand in Spain. We have more than 5000 films available and growing. Mostly indie and classics films. Users can choose between a subscription plan or a pay-per-view option. www.filmin.es
Company name: Comunidad filmin s.l. (trademark: filmin)
Product name or use case: We use Hapi to power our Smart TVs API and to save/retrieve the last playback point of a film.
Is it in production or development?: Production.
Contact information for further questions: [email protected]
Contact information for security alerts: [email protected]
Link to logo if we can showcase your company on the new site: http://static.filmin.es/img/filmin-logo-dark-grey.png
User quote (with attribution) about your hapi user experience (up to 300 characters): We started using Hapi for a simple task of our platform. We loved how easy was to set up the service so we rewrote the entire Smart TVs API from PHP to NodeJS. It was a fun, fast and easy to get started. Gerard Nesta, filmin
Moved this from #43 comments, thanks @johnbrett.
Company Name: D4H Technologies
Product Name: Decisions, An Emergency Response Team Management System
Is it in production or development?: In production, powering our mobile and web app APIs.
Contact information for further questions: [email protected]
Contact information for security alerts: [email protected], [email protected]
Link to logo if we can showcase your company on the new site: Logo
User quote (with attribution) about your hapi user experience (up to 300 characters):
Hapi enabled, and encouraged our first venture into Node by allowing us to quickly produce complex APIs with a comprehensible structure, with input validation, authentication, and documentation made easy. Excellent work by the Hapi team, can't thank you enough.
John Brett, Lead Engineer, D4H Technologies
Recently I came across few very useful gists, like using bell with auth-cookie together, using socket.io with auth-cookie. How about make new section on website where these examples could live similarly as plugins?
Gists have also star rating, that could be displayed via https://github.com/mdo/github-buttons .
Thoughts?
See hapijs/lab#206
I found references to Nipple in the API documentation at http://hapijs.com/api. It should be changed to wreck.
Something like github allows, where you can click a line and shift click a second line and create a link to that specific code block. Would be nice.
Hey guys,
Been hard at work with a new open source project. It is designed to make it very simple to create RESTful CRUD endpoints for a Hapi server using MongoDB.
https://github.com/smaxwellstewart/toothache
I called it toothache
to try and fit in with the awesome Ren and Stimpy naming convention. @hueniverse let me know if you want to reserve names like this for modules that have been developed by the hapijs team only, I can change it if so.
The code coverage is at 100% and I have tried to add clear documentation. Want to live up to the Hapi standard!
If you guys wanted to feature it on the hapijs.com website that would be awesome.
All the best,
Simon
We've added a plugin list to hapijs.com!
We need your help though. If you wrote a plugin, or have a plugin that you use often that isn't already listed, please send us a pull request adding it to the site.
If your plugin fits under one of the existing categories, please use it. If not, creating a new category is fine. Let's keep the list in alphabetical order to be fair to everyone and get this thing filled out!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.