Skip to content

Instantly share code, notes, and snippets.

View tribou's full-sized avatar

Aaron Tribou tribou

View GitHub Profile
case AppConstants.GET_RANDOM_RESPONSE:
// Construct the new todo string
var newTodo = 'Call '
+ action.response.results[0].user.name.first
+ ' about real estate in '
+ action.response.results[0].user.location.city;
// Add the new todo to the list
_store.list.push(newTodo);
// Todo store
//
// Requiring the Dispatcher, Constants, and
// event emitter dependencies
var AppDispatcher = require('../dispatcher/AppDispatcher');
var AppConstants = require('../constants/TodoConstants');
var ObjectAssign = require('object-assign');
var EventEmitter = require('events').EventEmitter;
var CHANGE_EVENT = 'change';
// React components
var React = require('react');
var TodoStore = require('../stores/TodoStore.js');
var TodoActions = require('../actions/TodoActions.js');
var TodoItem = React.createClass({
render: function() {
return(
// Create a basic Hapi.js server
require('babel-register')({
presets: ['es2015', 'react'],
});
var Hapi = require('hapi');
var dateFormat = require('dateformat');
var format = "dd mmm HH:MM:ss";
// Basic Hapi.js connection stuff
var server = new Hapi.Server();
// Default layout template
var React = require('react');
var Default = React.createClass({
render: function() {
return(
<html>
<head>
// Webpack config file
module.exports = {
entry: './assets/js/components/Index.jsx',
output: {
path: __dirname + '/assets/js',
filename: 'bundle.js'
},
module: {
loaders: [
{
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules",
"assets/*"
],
"ext": "js json jsx"
}
@tribou
tribou / Dockerfile
Last active October 26, 2017 05:47
FROM node:0.12
MAINTAINER tribou
# Prepare app directory
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
# Install dependencies
WORKDIR /usr/src/app
RUN npm install
web:
build: .
links:
- db
environment:
- DB_HOST=db
ports:
- '8000:8000'
command: npm start
db:
.git
.gitignore
.editorconfig
node_modules
*.log
*.md