瀏覽代碼

remove context related intro.

tags/v0.9.0
jimzhan 9 年之前
父節點
當前提交
3a7b57c8ca
共有 1 個檔案被更改,包括 4 行新增3 行删除
  1. +4
    -3
      README.md

+ 4
- 3
README.md 查看文件

@@ -67,18 +67,19 @@ All settings on Rex can be accessed via `env`, which essentially stored in `os.E
package main

import (
"io"

"github.com/goanywhere/rex"
"github.com/goanywhere/x/env"
)

func index (ctx *rex.Context) {
ctx.Render("index.html")
func index(w http.ResponseWriter, r *http.Request) {
io.WriteString("Hey you")
}

func main() {
// Override default 5000 port here.
env.Set("PORT", 9394)

rex.Get("/", index)
rex.Run()
}

Loading…
取消
儲存