-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.rb
More file actions
37 lines (35 loc) · 766 Bytes
/
main.rb
File metadata and controls
37 lines (35 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
require 'slim'
require_relative 'inc/pagevars'
require_relative 'inc/api'
set :port, ENV['PORT'] || 8080
set :bind, ENV['IP'] || '0.0.0.0'
get '/' do
@PageTitle = "Home"
@TRAVISBUILDNUMBER = Pagevars.setVars("CIbuild")
slim :home
end
get '/contact' do
@PageTitle = "Contact"
@TRAVISBUILDNUMBER = Pagevars.setVars("CIbuild")
slim :homecontact
end
get '/pricing' do
@PageTitle = "Pricing"
@TRAVISBUILDNUMBER = Pagevars.setVars("CIbuild")
slim :homepricing
end
get '/features' do
@PageTitle = "Features"
@TRAVISBUILDNUMBER = Pagevars.setVars("CIbuild")
slim :homefeatures
end
#Beginning API
get '/api/:cmd1' do
API.processCMD1(params[:cmd1])
end
get '/api' do
API.processCMD0()
end