This file contains hidden or 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
defmodule HelloPhoenix.HelloView do | |
use HelloPhoenix.Web, :view | |
end |
This file contains hidden or 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
defmodule HelloPhoenix.HelloController do | |
use HelloPhoenix.Web, :controller | |
plug :action | |
def index(conn, _params) do | |
render conn, "index.html" | |
end | |
end |
This file contains hidden or 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
defmodule HelloPhoenix.Router do | |
use HelloPhoenix.Web, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_flash | |
plug :protect_from_forgery | |
end |
This file contains hidden or 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
!!! | |
%html{:lang => "ja"} | |
%head | |
%title= @title | |
%meta{:content => "text/html", :"http-equiv" => "Content-Type", :charset => "utf-8"} | |
%body | |
%h1 #{@title} |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: sinatra_start.rb | |
# Create Day is 2015/05/20 | |
# Last Update Day is 2015/05/27 | |
# Gem List | |
gem 'tilt', '1.4.1' | |
# Require List | |
require 'sinatra' |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: mongo_main03.rb | |
# Create Day is 2015/05/27 | |
# Last Update Day is 2015/05/27 | |
# Require List | |
require 'mongo' | |
puts "MongoDB test!!" |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: mongo_main02.rb | |
# Create Day is 2015/05/26 | |
# Last Update Day is 2015/05/26 | |
# Require List | |
require 'mongo' | |
puts "MongoDB test!!" |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: mongo_main.rb | |
# Create Day is 2015/05/25 | |
# Last Update Day is 2015/05/25 | |
# Require List | |
require 'mongo' | |
puts "MongoDB test!!" |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: date_time.rb | |
# Create Day is 2015/05/22 | |
# Last Update Day is 2015/05/22 | |
# Require List | |
require 'time' | |
puts "Timeクラス" |
This file contains hidden or 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
# encoding: utf-8 | |
# File Name: date_time.rb | |
# Create Day is 2015/05/22 | |
# Last Update Day is 2015/05/22 | |
# Require List | |
require 'date' | |
puts "DateTimeクラス" |