Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: sky/tools/skygo/sky_server.go

Issue 881093003: Normalize import paths for Sky modules (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "flag" 8 "flag"
9 "fmt" 9 "fmt"
10 "io/ioutil" 10 "io/ioutil"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 fmt.Fprintf(os.Stderr, " /echo_post -> custom echo handler\n") 72 fmt.Fprintf(os.Stderr, " /echo_post -> custom echo handler\n")
73 http.HandleFunc("/echo_post", func(w http.ResponseWriter, r *http.Request) { 73 http.HandleFunc("/echo_post", func(w http.ResponseWriter, r *http.Request) {
74 defer r.Body.Close() 74 defer r.Body.Close()
75 body, _ := ioutil.ReadAll(r.Body) 75 body, _ := ioutil.ReadAll(r.Body)
76 w.Write(body) 76 w.Write(body)
77 }) 77 })
78 78
79 addMapping("/gen/", genRoot) 79 addMapping("/gen/", genRoot)
80 80
81 // FIXME: Unclear if these are correct now that we have /gen.
82 // /gen is more explicit, but also is less like how a 3rd party might
83 // deploy a sky app.
84 addMapping("/mojo/public/", path.Join(genRoot, "mojo", "public"))
85 addMapping("/mojo/services/", path.Join(genRoot, "mojo", "services"))
86 addMapping("/sky/services/", path.Join(genRoot, "sky", "services"))
87
88 http.ListenAndServe(":" + port, nil) 81 http.ListenAndServe(":" + port, nil)
89 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698