• Stars
    star
    794
  • Rank 54,994 (Top 2 %)
  • Language
    HTML
  • Created almost 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โ˜€๏ธ Learn to use Hapi.js (Node.js) web framework to build scalable apps in less time

Happiness Is...

Build Status codecov.io test coverage Code Climate Dependencies devDependencies Status NPM Version HitCount

Learn Hapi

Happiness is learning how to use the Hapi.js (Node.js) web framework to build reliable/scalable apps faster.

What is Hapi?

Hapi is the framework for rapidly building RESTful & Real-Time web applications and services with Node.js.
Whether you are building a very simple API for your website/mobile app or a large scale, cache heavy, secure e-commerce website, hapi has you covered. Hapi will help get your server developed quickly with its wide range of configurable options.

Watch this intro/background to Hapi video:

What is Hapi?

Most people/teams that have tried Hapi have embraced Hapi to build complete web applications. But if you are only building a REST API (e.g. for a mobile app) please read: https://github.com/dwyl/learn-api-design

Why Hapi instead of XYZ framework?

Q: I already know how to build REST APIs in {framework-xyz} why learn a new framework?
A: If you are happy with your existing system & level of team productivity, stick with what you know. If not, learn [how to be] Hapi. (We have built Sites/APIs with both Express, Restify, Sails & Meteor and find Hapi has solved more "real world" problems and thus we end up writing less code. YMMV. See benefits below)

Q: Hapi looks like quite a steep learning curve, how long will it take me to learn?
A: You can get started immediately with the examples below, it will take approximately 60 mins to complete them all (after that add a couple of hours to read/learn further). The most important part is to try Hapi on a simple project to gain experience/confidence.

Key Benefits

  • Security - The Lead Developer of Hapi is Eran Hammer who was one of the original authors of the OAuth (Secure Authentication) Spec. He has built a security-focussed mindset into Hapi and reviews all code included in Hapi. Several members of the Node Security Project are core contributors to Hapi which means there are many security-minded eyes on the code.
  • Scalability - they have focussed on horizontal-scalability and battle-tested the framework during Black Friday (holiday shopping busy day) without incident.
  • Mobile Optimised (lightweight - built for mobile e-commerce)
  • Plugin Architecture - extend/add your own modules (good ecosystem)
  • DevOps Friendly - configuration based deployment and great stats/logging see: #logging with good section below!
  • Built-in Caching (Redis, MongoDB or Memcached)
  • 100% Test/Code Coverage (for the core) - disciplined approach to code quality
  • Testability - End-to-End testing is built-in to Hapi because it includes shot

In-depth Comparison to Express.js

@ethanmick wrote a detailed post on why he prefers Hapi to Express: https://www.ethanmick.com/why-i-like-hapi-more-than-express/ --its worth a read. PDF

Beginner Friendly Examples/Apps to Learn From/With

We have a few "beginner" example apps (with documentation & tests!) that will help you get started with something a bit more "real world":

For a list of examples see: https://github.com/dwyl?&query=example

Who (is using Hapi) ? contributions welcome

The list of teams using Hapi.js to build their node.js apps grows every day! See: https://hapijs.com/community

While you should not make your decisions to use a given technology based on who else is using it, you should be aware that and if you need to answer the question: "Who is already using this in Production?" it's really useful to have a good list.

How?! (Dive In!)

Requirements

  • A computer that can run Node.js Mac/Windows/Linux/Chromebook
  • Access to the Internet (only required for installation)
  • 60 minutes of time +/-

Optional

(Not essential before you start, however) You will benefit from having:

  • Basic JavaScript knowledge
  • Basic experience of using node.js's http module.

Make Me Hapi ("Official" Beginner Workshop)

First thing you should do to get familiar with Hapi is work through the makemehapi workshop.
(assumes some node.js prior knowledge but otherwise a gentle self-paced introduction)

Note: makemehapi currently uses Hapi v16. Some major changes were introduced to Hapi in v17. Differences between v16 and v17

Create a new folder on your local machine for your answers to makemehapi:

mkdir makemehapi && cd makemehapi

Install the workshop:

npm install -g makemehapi@latest

( if it fails to install see: https://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo )

Once its installed, start the tutorial with the following command:

makemehapi

Try to complete all challenges.

makemehapi complete

If you get stuck, you can either google for the specific error you are seeing or if you are not "getting" it, you can always look at my answers in the /makemehapi directory of this repository or
the "official" solutions in the /makemehapi/exercises/{exercise-name}/solution directory
e.g: https://github.com/hapijs/makemehapi/tree/master/exercises/hello_hapi/solution

or if you still don't get it, ask us: https://github.com/dwyl/learn-hapi/issues


Extended Examples

For the rest of the tutorial we will cover the various plugins and features we have used in the Hapi.js ecosystem that will help you getting up-and-running with Hapi!

Recap: Hello World in Hapi

Once you have completed the makemehapi workshop, on your computer, create a new directory called "hapiapp". e.g:

mkdir hapiapp && cd hapiapp

Type out (or copy-paste) this code into a file called index.js

const Hapi = require('hapi');
const server = new Hapi.Server({port: 3000}); // tell hapi which TCP Port to "listen" on

server.route({
	method: 'GET',        // define the method this route will handle
	path: '/{yourname*}', // this is how you capture route parameters in Hapi
	handler: function(req, h) { // request handler method
		return 'Hello ' + req.params.yourname + '!'; // reply with text.
	}
});

async function startServer() {
  await server.start() // start the Hapi server on your localhost
  console.log('Now Visit: http://localhost:' + server.info.port + '/YOURNAME');
}

startServer();

module.exports = server;

Install Hapi:

npm init -y && npm install hapi --save

Run:

node .

Visit: http://localhost:3000/YOURNAME (in your browser) you should see something like:

hello world in hapi

Validation with Joi

Validation is a fancy way of saying "checking" a value is the type / format and length you expect it to be.

e.g. imagine you ask people to input their phone number and some joker enters letters instead of numbers. The validation will display a message to the person informing the data is incorrect.

Joi is the validation library built by the same team as Hapi. Most people use Joi with Hapi, but given that it is a separate module, plenty of people use Joi independently; its well worth checking it out!

An example: Type out (or copy-paste) this code into a file called hellovalidate.js

// Start this app from your command line with: node hellovalidate.js
// then visit: http://localhost:3000/YOURNAME

const Hapi = require('hapi'),
    Joi  = require('joi');

const server = new Hapi.Server({ port: 3000 });

server.route({
	method: 'GET',
	path: '/{yourname*}',
	config: {  // validate will ensure YOURNAME is valid before replying to your request
		validate: {
			params: {
				yourname: Joi.string().min(2).max(40).alphanum().required()
			}
		},
		handler: function (req, h) {
			return 'Hello '+ req.params.yourname + '!';
		}
	}
});

async function startServer() {
  await server.start(); // start the Hapi server on your localhost
  console.log('Now Visit: http://localhost:' + server.info.port + '/YOURNAME');
}

startServer();

Now try entering an invalid name: http://localhost:3000/T
You should see a Validation Error:

Hapi Joi validation error

This might not look like a "Friendly" Error message. But as we will see later, it provides all the information we need in our Client/App and we can display a more user-friendly error to people.

Joi has many more useful validation methods. We will use a few of them later on when we build our example app.

Testing with Lab

If you're new to Test Driven Development (TDD) read our Beginners' TTD Tutorial: https://github.com/dwyl/learn-tdd (first)
and then come back to this tutorial!

If you've done functional or unit testing in previous programming projects you will be at home with Lab.

Lab borrows heavily from Mocha, so if you followed our learn-mocha tutorial this should all be familiar.

(Using the code we wrote above in the Validation with Joi section with a minor addition) An example of testing with Lab:

const Lab = require("lab");           // load Lab module
const lab = exports.lab = Lab.script(); //export test script
const Code = require("code");		 //assertion library
const server = require("../examples/hellovalidate.js");

lab.experiment("Basic HTTP Tests", function() {
	// tests
	lab.test("GET /{yourname*} (endpoint test)", async function() {
		const options = {
			method: "GET",
			url: "/Timmy"
		};
		// server.inject lets you simulate an http request
		const response = await server.inject(options);
		Code.expect(response.statusCode).to.equal(200);  //  Expect http response status code to be 200 ("Ok")
		Code.expect(response.result).to.have.length(12); // Expect result to be "Hello Timmy!" (12 chars long)
		await server.stop();
	});
});

First we create a test suite for our test Lab.experiment (the first argument is the name of the test suite "Basic HTTP Tests")

Next is a basic test that calls the only route we have /{yourname} in this case GET /Timmy.
We expect to receive a 200 http status code and the response body to be the text "Hello Timmy!".

  1. Create a new directory in your project called test
  2. Create a new file called test.js in the ./test dir
  3. Type out or copy-paste the above code into test.js
  4. Open your package.json file
  5. Add a scripts section to the package.json file with the following:
  "scripts": {
    "test": "lab -c"
  }
  1. Save the package.json file
  2. run the npm test script from your command line to execute the tests

The result should look something like this:

Hapi testing with Lab 100% coverage

Note how the test script has a -c (coverage) flag above this give us the code coverage.

We have 100% code coverage so we can move on to our next test/feature!

How do you think we would write a test for an error? (hint: have a look inside ./test/test.js and see the second test :)

Note on Testing: Tape is Simpler than Lab+Code

While Lab is really Good and is the "official" testing framework used by Hapi, we prefer
the simplicity of tape; we find our tests are simpler to write/read/understand. #YMMV Also we prefer to use a separate & specialised module for tracking test coverage: istanbul which we find does a better job at tracking coverage...

The preceding Lab test can be re-written (simplified) in Tape as:

const test   = require('tape');
const server = require("../index.js"); // our index.js from above

test("Basic HTTP Tests - GET /{yourname*}", async function(t) { // t
	const options = {
		method: "GET",
		url: "/Timmy"
	};
	// server.inject lets you similate an http request
	const response = await server.inject(options);
	t.equal(response.statusCode, 200);  //  Expect http response status code to be 200 ("Ok")
	t.equal(response.result.length, 12); // Expect result to be "Hello Timmy!" (12 chars long)
	await server.stop();
	t.end();  // t.end() is required to end the test in tape
});

These tests are functionally equivalent in that they test exactly the same outcome. Decide for yourself which one you prefer for readability and maintainability in your projects.
For our Tape Tutorial see: https://github.com/dwyl/learn-tape

Related Links

Continuous Integration

Making sure your code is working as you expect it to (over time).

Integrating Hapi with Travis CI

If you are new to Travis-CI or need a refresher see: https://github.com/dwyl/learn-travis

We have Travis-CI enabled for all our hapi.js based projects:

So if you need an example to follow, check out our repos!
And as always, if you have any questions, ask!

Error Handling with Boom

Boom makes custom errors easier in Hapi. Imagine you have a page or item of content (photo, message, etc.) that you want to protect from public view (only show to someone who is logged in).

First install boom:

npm install boom --save

Next write another test in ./test/test.js (If you aren't used to "Test First" - trust the process...)

lab.experiment("Authentication Required to View Photo", function() {
    // tests
    lab.test("Deny view of photo if unauthenticated /photo/{id*} ", async function() {
	    const options = {
	        method: "GET",
	        url: "/photo/8795"
	    };
	 	// server.inject lets you simulate an http request
	    const response = await server.inject(options);
      Code.expect(response.statusCode).to.equal(401);  //  Expect http response status code to be 200 ("Ok")
      Code.expect(response.result.message).to.equal("Please log-in to see that"); // (Don't hard-code error messages)
	});
});

When you run npm test you will see a fail:

Hapi auth test fail

Next we want to make this test pass and we'll use Boom to get our custom error message.

The wrong way of doing this is to explicitly hard-code the response for this route. The right way is to create a generic route which responds to any request for a photo with any id. And since we don't currently have any authentication set up, we mock (fake) it. (Don't worry we will get to the authentication in the next step...)

const Boom = require('boom');
server.route({
  method: 'GET',
  path: '/photo/{id*}',
  config: {  // validate will ensure `id` is valid before replying to your request
    validate: { params: { id: Joi.string().max(40).min(2).alphanum() } },
    handler: function (req, h) {
        // until we implement authentication we are simply returning a 401:
        return Boom.unauthorized('Please log-in to see that');
        // the key here is our use of the Boom.unauthorised method
    }
  }
});

Our test passes but the point was to show that returning errors with specific messages is easy with Boom.

learn-hapi-clearer-boom-message

Have a look at https://github.com/hapijs/boom for more error response options. We will be using these later as we build our app. Let's move on to authentication.

For a more user-friendly approach to error-handling see: https://github.com/dwyl/hapi-error

Logging with good

Application logging can often be an afterthought developers only implement after they have a production bug which is crashing their API/App and they are scrambling to try and "debug" it.

Thankfully, it Hapi has first-class support for logging with the good module.

We have written a little example you can use to get started: examples/hellogood.js

Run it locally with node examples/hellogood.js then visit http://localhost:3000/hello/yourname in your browser.

Note: Good is not yet compatible with Hapi 17, so this code will only run if you are using v16. See here for more details

You should expect to see something like this: learn-hapi-good-log-two-ops

There are good examples including logging use http (e.g. to a 3rd party logging tool) in the Good repo: https://github.com/hapijs/good/tree/master/examples

Again, if you have any questions, ask

Authentication

Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be.

Authentication (or "Auth") is something many novice (naive?) developers attempt to write themselves. (I was once that kid... trust me, we have bigger fish to fry, use a well-written/tested library!)

We have 4 options:

  1. Google - If you are building an "enterprise" or "education" app which you know will be used in Google-enabled companies/schools we wrote a Hapi plugin: https://github.com/dwyl/hapi-auth-google which lets you include Google Login in your app in a few clear steps. The plugin uses the Official Google Node.js API Client and is written to be as readable as possible for complete beginners.
  2. EveryAuth - Specific to Connect/Express apps: https://github.com/bnoguchi/everyauth
  3. Passport.js - 100% Code Coverage and many excellent integrations https://passportjs.org/guide/providers/
  4. Bell - the 3rd party Login Hapi.js Plugin is good however we found it lacking in documentation/usage examples, which is why we wrote our own (simpler) Auth Plugin specific to our projects. see: https://github.com/dwyl?query=auth

Bell

The go-to solution for 3rd party authentication in hapi is bell: https://github.com/hapijs/bell. There are a few good examples in the repo: https://github.com/hapijs/bell/tree/master/examples.

Caching with Catbox

Most apps don't need caching from "Day 1" (because you don't know upfront where your app's bottlenecks are going to be...).

But, once again, the team that brought you Hapi.js have solved the problem of caching, see: https://github.com/hapijs/catbox/ and https://hapijs.com/tutorials/caching

We use Redis for blazing fast application and data caching. Hapi.js Catbox makes this very easy!

Using Socket.io with Hapi for Real-Time Apps

Using Socket.io with Hapi.js could not be easier! To help you get started we've built a fully-functional chat application with tests (now featured on the hapijs.com Resources page), which demonstrates the power of Real-Time data-synching in your apps.

https://github.com/dwyl/hapi-socketio-redis-chat-example

Hapi v16

There were some major changes introduced to Hapi when version 17 was released. For a full list, see the version 17 release notes, but here are the major differences relevant to this guide:

  • Callbacks replaced with async functions. This means that instead of passing a callback to the function, and having that called when the function is finished, hapi functions return a promise that can either be resolved, or called synchronously with await. For more on async functions, see MDN and this guide
  • server.connection() replaced with options passed directly into the server when it's created. A small change, but important to update. Before, we created our server with:
	var server = new Hapi.server();

and passed our options to:

	server.connection({port: 8000});

Now, we just pass our options straight away, and no longer need to call the connection method:

	const server = new Hapi.server({port: 8000});
  • reply() interface replaced with a new lifecycle methods interface. You no longer have to call reply when sending a response from a handler. You can now just:
	return "your reply";

And the reply parameter to your handler has been replaced with a response toolkit (h) containing helpers from hapi core and your plugins.

Not all of the hapi plugins have been updated to work with v17 yet (For example Bell, and Good), so be careful if you decide to upgrade an existing project.

The previous version of this tutorial and code examples for Hapi 16 can be found here: https://github.com/dwyl/learn-hapi/tree/b58495ea002a9f3f8af8d183f6004d2b483f4591

Please Suggest Improvements! contributions welcome

If you want to extend this tutorial or simply request additional sections, open an issue on GitHub: https://github.com/dwyl/learn-hapi/issues

Background Reading / Watching

Video Intro

Tutorials

Selected StackOverflow Questions & Answers:

More Repositories

1

english-words

๐Ÿ“ A text file containing 479k English words for all your dictionary/word-based projects e.g: auto-completion / autosuggestion
Python
9,337
star
2

learn-json-web-tokens

๐Ÿ” Learn how to use JSON Web Token (JWT) to secure your next Web App! (Tutorial/Example with Tests!!)
JavaScript
4,178
star
3

learn-to-send-email-via-google-script-html-no-server

๐Ÿ“ง An Example of using an HTML form (e.g: "Contact Us" on a website) to send Email without a Backend Server (using a Google Script) perfect for static websites that need to collect data.
HTML
3,047
star
4

repo-badges

โญ Use repo badges (build passing, coverage, etc) in your readme/markdown file to signal code quality in a project.
HTML
2,831
star
5

learn-tdd

โœ… A brief introduction to Test Driven Development (TDD) in JavaScript (Complete Beginner's Step-by-Step Tutorial)
JavaScript
2,698
star
6

start-here

๐Ÿ’ก A Quick-start Guide for People who want to dwyl โค๏ธ โœ…
1,725
star
7

learn-elixir

๐Ÿ’ง Learn the Elixir programming language to build functional, fast, scalable and maintainable web applications!
Elixir
1,586
star
8

learn-travis

๐Ÿ˜Ž A quick Travis CI (Continuous Integration) Tutorial for Node.js developers
JavaScript
1,251
star
9

Javascript-the-Good-Parts-notes

๐Ÿ“– Notes on the seminal "JavaScript the Good Parts: by Douglas Crockford
1,173
star
10

aws-sdk-mock

๐ŸŒˆ AWSomocks for Javascript/Node.js aws-sdk tested, documented & maintained. Contributions welcome!
JavaScript
1,079
star
11

learn-aws-lambda

โœจ Learn how to use AWS Lambda to easily create infinitely scalable web services
JavaScript
1,035
star
12

book

๐Ÿ“— Our Book on Full-Stack Web Application Development covering User Experience (UX) Design, Mobile/Offline/Security First, Progressive Enhancement, Continuous Integration/Deployment, Testing (UX/TDD/BDD), Performance-Driven-Development and much more!
Rust
816
star
13

hapi-auth-jwt2

๐Ÿ”’ Secure Hapi.js authentication plugin using JSON Web Tokens (JWT) in Headers, URL or Cookies
JavaScript
795
star
14

phoenix-chat-example

๐Ÿ’ฌ The Step-by-Step Beginners Tutorial for Building, Testing & Deploying a Chat app in Phoenix 1.7 [Latest] ๐Ÿš€
Elixir
721
star
15

learn-tachyons

๐Ÿ˜ Learn how to use Tachyons to craft beautiful, responsive and fast UI with functional CSS!
HTML
670
star
16

learn-phoenix-framework

๐Ÿ”ฅ Phoenix is the web framework without compromise on speed, reliability or maintainability! Don't settle for less. ๐Ÿš€
Elixir
639
star
17

learn-nightwatch

๐ŸŒœ Learn how to use Nightwatch.js to easily & automatically test your web apps in *real* web browsers.
JavaScript
585
star
18

javascript-todo-list-tutorial

โœ… A step-by-step complete beginner example/tutorial for building a Todo List App (TodoMVC) from scratch in JavaScript following Test Driven Development (TDD) best practice. ๐ŸŒฑ
JavaScript
565
star
19

learn-elm

๐ŸŒˆ discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
HTML
472
star
20

learn-redux

๐Ÿ’ฅ Comprehensive Notes for Learning (how to use) Redux to manage state in your Web/Mobile (React.js) Apps.
HTML
446
star
21

learn-devops

๐Ÿšง Learn the craft of "DevOps" (Developer Operations) to Deploy your App and Monitor it so it stays "Up"!
Shell
411
star
22

hits

๐Ÿ“ˆ General purpose hits (page views) counter
Elixir
397
star
23

hapi-socketio-redis-chat-example

๐Ÿ’ฌ Real-time Chat using Hapi.js + Socket.io + Redis Pub/Sub (example with tests!!)
Elm
363
star
24

hapi-typescript-example

โšก Hapi.Js + Typescript = Awesomeness
TypeScript
351
star
25

phoenix-liveview-counter-tutorial

๐Ÿคฏ beginners tutorial building a real time counter in Phoenix 1.7.7 + LiveView 0.19 โšก๏ธ Learn the fundamentals from first principals so you can make something amazing! ๐Ÿš€
Elixir
345
star
26

learn-istanbul

๐Ÿ Learn how to use the Istanbul JavaScript Code Coverage Tool
JavaScript
339
star
27

learn-redis

๐Ÿ“• Need to store/access your data as fast as possible? Learn Redis! Beginners Tutorial using Node.js ๐Ÿš€
JavaScript
291
star
28

technology-stack

๐Ÿš€ Detailed description + diagram of the Open Source Technology Stack we use for dwyl projects.
JavaScript
281
star
29

phoenix-ecto-encryption-example

๐Ÿ” A detailed example for how to encrypt data in an Elixir (Phoenix v1.7) App before inserting into a database using Ecto Types
Elixir
269
star
30

learn-elasticsearch

๐Ÿ” Learn how to use ElasticSearch to power a great search experience for your project/product/website.
Elixir
265
star
31

home

๐Ÿก ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ’ก home is where you can [learn to] build the future surrounded by like-minded creative, friendly and [intrinsically] motivated people focussed on health, fitness and making things people and the world need!
245
star
32

elixir-auth-google

๐Ÿ‘คMinimalist Google OAuth Authentication for Elixir Apps. Tested, Documented & Maintained. Setup in 5 mins. ๐Ÿš€
Elixir
228
star
33

learn-docker

๐Ÿšข Learn how to use docker.io containers to consistently deploy your apps on any infrastructure.
Dockerfile
220
star
34

learn-elm-architecture-in-javascript

๐Ÿฆ„ Learn how to build web apps using the Elm Architecture in "vanilla" JavaScript (step-by-step TDD tutorial)!
JavaScript
207
star
35

learn-environment-variables

๐Ÿ“Learn how to use Environment Variables to keep your passwords and API keys secret. ๐Ÿ”
JavaScript
201
star
36

learn-postgresql

๐Ÿ˜ Learn how to use PostgreSQL and Structured Query Language (SQL) to store and query your relational data. ๐Ÿ”
JavaScript
195
star
37

learn-tape

โœ… Learn how to use Tape for JavaScript/Node.js Test Driven Development (TDD) - Ten-Minute Testing Tutorial
JavaScript
185
star
38

sendemail

๐Ÿ’Œ Simplifies reliably sending emails from your node.js apps using AWS Simple Email Service (SES)
JavaScript
181
star
39

phoenix-todo-list-tutorial

โœ… Complete beginners tutorial building a todo list from scratch in Phoenix 1.7 (latest)
Elixir
171
star
40

decache

:shipit: Delete Cached node_modules useful when you need to "un-require" during testing for a fresh state.
JavaScript
151
star
41

quotes

๐Ÿ’ฌ a curated list of quotes that inspire action + code that returns quotes by tag/author/etc. ๐Ÿ’ก
Elixir
150
star
42

learn-heroku

๐Ÿ Learn how to deploy your web application to Heroku from scratch step-by-step in 7 minutes!
Python
149
star
43

learn-chrome-extensions

๐ŸŒ Discover how to build and deploy a Google Chrome Extension for your Project!
139
star
44

labels

๐Ÿท Sync GitHub Labels from any Source to Target Repositories for Consistency across all your projects!
Elixir
136
star
45

ISO-27001-2013-information-technology-security

๐Ÿ” Probably the most boring-but-necessary repo on GitHub. If you care about the security/privacy of your data...! โœ…
136
star
46

learn-ab-and-multivariate-testing

๐Ÿ†Ž Tutorial on A/B and multivariate testing โœ”๏ธ
135
star
47

web-form-to-google-sheet

A simple example of sending data from an ordinary web form straight to a Google Spreadsheet without a server.
HTML
133
star
48

app

Clear your mind. Organise your life. Ignore distractions. Focus on what matters.
Dart
133
star
49

auth

๐Ÿšช ๐Ÿ” UX-focussed Turnkey Authentication Solution for Web Apps/APIs (Documented, Tested & Maintained)
Elixir
124
star
50

learn-circleci

โœ… A quick intro to Circle CI (Continuous Integration) for JavaScript developers.
121
star
51

learn-regex

โ‰๏ธ A simple REGular EXpression tutorial in JavaScript
120
star
52

learn-react

"The possibilities are numerous once we decide to act and not react." ~ George Bernard Shaw
HTML
108
star
53

learn-aws-iot

๐Ÿ’ก Learn how to use Amazon Web Services Internet of Things (IoT) service to build connected applications.
JavaScript
101
star
54

env2

๐Ÿ’ป Simple environment variable (from config file) loader for your node.js app
JavaScript
100
star
55

phoenix-liveview-chat-example

๐Ÿ’ฌ Step-by-step tutorial creates a Chat App using Phoenix LiveView including Presence, Authentication and Style with Tailwind CSS
Elixir
98
star
56

how-to-choose-a-database

How to choose the right dabase
93
star
57

imgup

๐ŸŒ… Effortless image uploads to AWS S3 with automatic resizing including REST API.
Elixir
88
star
58

contributing

๐Ÿ“‹ Guidelines & Workflow for people contributing to our project(s) on GitHub. Please โญ to confirm you've read & understood! โœ…
85
star
59

javascript-best-practice

A collection of JavaScript Best Practices
83
star
60

learn-amazon-web-services

โญ Amazing Guide to using Amazon Web Services (AWS)! โ˜๏ธ
83
star
61

range-touch

๐Ÿ“ฑ Use HTML5 range input on touch devices (iPhone, iPad & Android) without bloatware!
JavaScript
83
star
62

learn-pre-commit

โœ… Pre-commit hooks let you run checks before allowing a commit (e.g. JSLint or check Test Coverage).
JavaScript
80
star
63

product-owner-guide

๐Ÿš€ A rough guide for people working with dwyl as Product Owners
78
star
64

phoenix-ecto-append-only-log-example

๐Ÿ“ A step-by-step example/tutorial showing how to build a Phoenix (Elixir) App where all data is immutable (append only). Precursor to Blockchain, IPFS or Solid!
Elixir
78
star
65

mvp

๐Ÿ“ฒ simplest version of the @dwyl app
Elixir
78
star
66

goodparts

๐Ÿ™ˆ An ESLint Style that only allows JavaScript the Good Parts (and "Better Parts") in your code.
JavaScript
77
star
67

hapi-error

โ˜” Intercept errors in your Hapi Web App/API and send a *useful* message to the client OR redirect to the desired endpoint.
JavaScript
76
star
68

flutter-todo-list-tutorial

โœ… A detailed example/tutorial building a cross-platform Todo List App using Flutter ๐Ÿฆ‹
Dart
75
star
69

process-handbook

๐Ÿ“— Contains our processes, questions and journey to creating a team
HTML
75
star
70

dev-setup

โœˆ๏ธ A quick-start guide for new engineers on how to set up their Dev environment
73
star
71

aws-lambda-deploy

โ˜๏ธ ๐Ÿš€ Effortlessly deploy Amazon Web Services Lambda function(s) with a single command. Less to configure. Latest AWS SDK and Node.js v20!
JavaScript
72
star
72

terminate

โ™ป๏ธ Terminate a Node.js Process (and all Child Processes) based on the Process ID
JavaScript
71
star
73

fields

๐ŸŒป fields is a collection of useful field definitions (Custom Ecto Types) that helps you easily define an Ecto Schema with validation, encryption and hashing functions so that you can ship your Elixir/Phoenix App much faster!
Elixir
69
star
74

learn-flutter

๐Ÿฆ‹ Learn how to use Flutter to Build Cross-platform Native Mobile Apps
JavaScript
69
star
75

hapi-login-example-postgres

๐Ÿฐ A simple registration + login form example using hapi-register, hapi-login & hapi-auth-jwt2 with a PostgreSQL DB
JavaScript
69
star
76

phoenix-liveview-todo-list-tutorial

โœ… Beginners tutorial building a Realtime Todo List in Phoenix 1.6.10 + LiveView 0.17.10 โšก๏ธ Feedback very welcome!
Elixir
64
star
77

learn-security

๐Ÿ” For most technology projects Security is an "after thought", it does not have to be that way; let's be proactive!
64
star
78

learn-javascript

A Series of Simple Steps in JavaScript :-)
HTML
63
star
79

chat

๐Ÿ’ฌ Probably the fastest, most reliable/scalable chat system on the internet.
Elixir
62
star
80

learn-jsdoc

๐Ÿ“˜ Use JSDoc and a few carefully crafted comments to document your JavaScript code!
CSS
60
star
81

ampl

๐Ÿ“ฑ โšก Ampl transforms Markdown into AMP-compliant html so it loads super-fast!
JavaScript
57
star
82

aguid

โ„๏ธ A Globally Unique IDentifier (GUID) generator in JS. (deterministic or random - you chose!)
JavaScript
56
star
83

tudo

โœ… Want to see where you could help on an open dwyl issue?
Elixir
56
star
84

learn-apple-watch-development

๐Ÿ“— Learn how to build Native Apple Watch (+iPhone) apps from scratch!
Swift
55
star
85

learn-qunit

โœ… A quick introduction to JavaScript unit testing with QUnit
JavaScript
51
star
86

learn-ngrok

โ˜๏ธ Learn how to use ngrok to share access to a Web App/Site running on your "localhost" with the world!
HTML
50
star
87

hapi-auth-jwt2-example

๐Ÿ”’ A functional example Hapi.js app using hapi-auth-jwt2 & Redis (hosted on Heroku) with tests!
JavaScript
49
star
88

learn-jshint

๐Ÿ’ฉ Learn how to use the ~~jshint~~ code quality/consistency tool.
JavaScript
49
star
89

tachyons-bootstrap

๐Ÿ‘ขBootstrap recreated using tachyons functional css
HTML
49
star
90

esta

๐Ÿ” Simple + Fast ElasticSearch Node.js client. Beginner-friendly defaults & Heroku support โœ… ๐Ÿš€
JavaScript
48
star
91

learn-node-js-by-example

โ˜๏ธ Practical node.js examples.
HTML
47
star
92

product-roadmap

๐ŸŒ Because why wouldn't you make your company's product roadmap Public on GitHub?
46
star
93

redis-connection

โšก Single Redis Connection that can be used anywhere in your node.js app and closed once (e.g in tests)
JavaScript
45
star
94

aws-lambda-test-utils

Mock event and context objects without fluff.
JavaScript
44
star
95

learn-graphQL

โ“Learn to use GraphQL - A query language that allows client applications to specify their data fetching requirements
JavaScript
44
star
96

elixir-pre-commit

โœ… Pre-commit hooks for Elixir projects
Elixir
43
star
97

hapi-login

๐Ÿšช The Simplest Possible (Email + Password) Login for Hapi.js Apps โœ…
JavaScript
43
star
98

learn-riot

๐ŸŽ Riot.js lets you build apps that are simpler and load/run faster than any other JS framework/library.
HTML
43
star
99

github-reference

โญ GitHub reference for *non-technical* people following a project's progress
42
star
100

learn-codeclimate

๐ŸŒˆ Learn how to use CodeClimate to track the quality of your JavaScript/Node.js code.
41
star