This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
build: ./ | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/app | |
ports: | |
- "3000:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
build: ./ | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/app | |
ports: | |
- "3000:3000" | |
links: | |
- db | |
db: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: postgresql | |
pool: 5 | |
host: db | |
username: postgres | |
timeout: 5000 | |
development: | |
<<: *default | |
database: expense_tracker_dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.git* | |
log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.2.3 | |
RUN \ | |
apt-get update -qq && \ | |
apt-get install -y build-essential | |
RUN mkdir app | |
WORKDIR app | |
COPY Gemfile ./ | |
RUN bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TaskStore = (function() { | |
var TaskStore = {}; | |
var state = {}; | |
TaskStore.addChangeListener = function() { | |
// left as an exercise - hint: event emitters | |
}; | |
TaskStore.addChangeListener = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Router exposes two methods: | |
// | |
// - register binds regex patterns to callbacks, | |
// | |
// - route takes a path, and executes the callback associated | |
// with the first regex that matches that path | |
Router = function() { | |
var instance = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppLink = React.createClass({ | |
render: function() { | |
return ( | |
<a href={this.props.href} onClick={this.onClick}> | |
{this.props.children} | |
</a> | |
); | |
}, | |
onClick: function(event) { | |
// don't reload page - dispatch a navigate Action, instead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Dispather.register(function(action) { | |
if (action.type !== 'navigate') { | |
return; | |
} | |
window.history.pushState({}, '', action.path); | |
}); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppLink = React.createClass({ | |
render: function() { | |
return ( | |
<a href={this.props.href} onClick={this.onClick}> | |
{this.props.children} | |
</a> | |
); | |
}, | |
onClick: function(event) { | |
event.preventDefault(); |
OlderNewer