This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
version: '3' | |
services: | |
mysql: | |
image: mysql:5.6 | |
restart: unless-stopped | |
container_name: mysql | |
ports: | |
- '3306:3306' | |
expose: | |
- '3306' |
import countryCodes from './countryCodes.json'; | |
const countryCallingCodeList = () => { | |
let codes = []; | |
countryCodes | |
.filter(country => { | |
if (country.countryCallingCodes.length === 0) { | |
return false; | |
} | |
return true; |
const phonepad = [ | |
[], | |
[], | |
['a', 'b', 'c'], | |
['d', 'e', 'f'], | |
['g', 'h', 'i'], | |
['j', 'k', 'l'], | |
['m', 'n', 'o'], | |
['p', 'q', 'r', 's'], | |
['t', 'u', 'v'], |
<header class="banner navbar navbar-default navbar-static-top" role="banner"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="sr-only">Toggle navigation</span> | |
<i id="toggle-menu"></i> | |
</button> | |
<a class="navbar-logo" href="<?php echo esc_url(home_url('/')); ?>"> | |
<picture> | |
<!--[if IE 9]><video style="display: none;"><![endif]--> |
<?php | |
/** | |
* Clean up the_excerpt() | |
*/ | |
function roots_excerpt_more() { | |
return ' … </p><p><a href="' . get_permalink() . '"><strong>' . __('Read More', 'roots') . '</strong></a>'; | |
} | |
add_filter('excerpt_more', 'roots_excerpt_more'); | |
//ES6 React Component imports, standard | |
import React, { Component } from 'react' | |
//import our redux connectors | |
import { bindActionCreators } from 'redux'; | |
import { connect } from 'react-redux'; | |
//import our action file so that we can quickly dispatch whatever we need. | |
import * as ImportedActions from '../actions/actionFile'; | |
//kick off the main component | |
export default class componentName extends Component { |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
{ | |
method: 'POST', | |
path: '/dostuff', | |
config: { | |
auth: false, | |
cors: { | |
additionalHeaders: ['accept'] | |
}, | |
handler: handleStuff | |
} |
/* | |
For this to run, ensure that `npm install hapi` has happened in your directory | |
setup whilst writing this: | |
iojs v. 1.0.5 | |
hapi 8.2.0 | |
*/ | |
var Hapi = require('hapi'); |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics