summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-25 03:13:22 +0100
committerhut <hut@lavabit.com>2010-02-25 20:27:54 +0100
commitb22ec5cfbd3b3501de170293c8465904a26b6377 (patch)
treeca3e21a296cf028b5474c5d29cb85b982231215c /ranger.py
parente9e4b4ffa4b4865c46acbebfc7ef2083bfac0210 (diff)
downloadranger-b22ec5cfbd3b3501de170293c8465904a26b6377.tar.gz
make clean: delete pyo files as well.
Diffstat (limited to 'ranger.py')
0 files changed, 0 insertions, 0 deletions
pan class='oid'>893123c ^
b9d16fb ^
fb63b07 ^
b9d16fb ^
d4c05d2 ^




893123c ^
fb63b07 ^
893123c ^
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




                  

                                     
                                

 

                     
             
                                               
 
                               
 
                                          




                                                                                                                                    
 
                                                                                 
 
package main

import (
	"log"
	"net/http"

	"github.com/gorilla/handlers"
	"github.com/gorilla/mux"
)

const getwtxt = "0.1"

func main() {
	log.Printf("getwtxt " + getwtxt + "\n")

	serv := mux.NewRouter()

	serv.HandleFunc("/", indexHandler)
	serv.HandleFunc("/{api:(?:api|api/)}", apiBaseHandler)
	serv.HandleFunc("/api/{format:(?:plain|plain/)}", apiFormatHandler)
	serv.HandleFunc("/api/{format:(?:plain)}/{endpoint:(?:mentions|mentions/|users|users/|tweets|tweets/)}", apiEndpointHandler)
	serv.HandleFunc("/api/{format:(?:plain)}/tags/{tags:[a-zA-Z0-9]+}", apiTagsHandler)
	serv.HandleFunc("/api/{format:(?:plain)}/{tagpathfixer:(?:tags|tags/)}", apiTagsBaseHandler)

	log.Fatalln(http.ListenAndServe(":8080", handlers.CompressHandler(serv)))
}