1 Star 0 Fork 0

fengzhitalker / iris

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README_JPN.md 14.90 KB
一键复制 编辑 原始数据 按行查看 历史
Gerasimos (Makis) Maropoulos 提交于 2019-01-11 02:10 . push version 11.1.1

Iris ウェブフレームワーク

build status report card vscode-iris chat view examples release

Irisはシンプルで高速、それにも関わらず充実した機能を有する効率的なGo言語のウェブフレームワークです。

Irisは表現力豊かなウェブサイトやAPIの基礎構造をいとも簡単に提供します。

Go言語におけるExpressjsと言っても過言ではないでしょう。

皆様の声をご覧ください。このレポジトリをStarし、最新情報を受け取りましょう。

支援者

支援者の方々、ありがとうございます! 🙏 支援者になる

$ cat example.go
package main

import "github.com/kataras/iris"

func main() {
    app := iris.New()
    // Load all templates from the "./views" folder
    // where extension is ".html" and parse them
    // using the standard `html/template` package.
    app.RegisterView(iris.HTML("./views", ".html"))

    // Method:    GET
    // Resource:  http://localhost:8080
    app.Get("/", func(ctx iris.Context) {
        // Bind: {{.message}} with "Hello world!"
        ctx.ViewData("message", "Hello world!")
        // Render template file: ./views/hello.html
        ctx.View("hello.html")
    })

    // Method:    GET
    // Resource:  http://localhost:8080/user/42
    //
    // Need to use a custom regexp instead?
    // Easy,
    // just mark the parameter's type to 'string'
    // which accepts anything and make use of
    // its `regexp` macro function, i.e:
    // app.Get("/user/{id:string regexp(^[0-9]+$)}")
    app.Get("/user/{id:long}", func(ctx iris.Context) {
        userID, _ := ctx.Params().GetInt64("id")
        ctx.Writef("User ID: %d", userID)
    })

    // Start the server using a network address.
    app.Run(iris.Addr(":8080"))
}

hereをクリックしてパスパラメータについて学ぶ

<!-- file: ./views/hello.html -->
<html>
<head>
    <title>Hello Page</title>
</head>
<body>
    <h1>{{.message}}</h1>
</body>
</html>
$ go run example.go
Now listening on: http://localhost:8080
Application Started. Press CTRL+C to shut down.
_

インストール

Go Programming Languageをインストールしていることが唯一の前提条件です。

$ go get -u github.com/kataras/iris

Irisはvendor directory機能の利点を活かしています。これが上流レポジトリの変更や削除を防ぐため、再現可能なビルドを実現します。

Iris vs .NET Core(C#) vs Node.js (Express)

Updated at: Tuesday, 21 November 2017

他のウェブフレームワークとの比較

Comparison with other frameworks

支援

  • HISTORYファイルはあなたの友人です。このファイルには、機能に関する最新の情報や変更点が記載されています。
  • バグを発見しましたか?github issuesに投稿をお願い致します。
  • 質問がありますか?または問題を即時に解決するため、熟練者に相談する必要がありますか?community chatに参加しましょう。
  • hereをクリックしてユーザーとしての体験を報告しましょう。
  • フレームワークを愛していますか?それならばツイートしましょう!他の人はこのようにツイートしています:



Irisプロジェクトに貢献して頂ける方は、CONTRIBUTING.md をお読みください.

全貢献者リスト

学習する

ウェブフレームワークで開発を行う時には、まず言語の基本を学ぶこと、標準的なhttpで何ができるのか知ることが重要です。あなたのアプリケーションが個人的なもので、とてもシンプル、パフォーマンスとメンテナンス性にそこまで拘らない場合、標準パッケージでの開発が推奨されます。以下のガイドラインを参照してください。

Irisスターターキット

  1. snowlyg/IrisApiProject: Iris + gorm + jwt + sqlite3 NEW-Chinese
  2. yz124/superstar: Iris + xorm to implement the star library NEW-Chinese
  3. jebzmos4/Iris-golang: A basic CRUD API in golang with Iris
  4. gauravtiwari/go_iris_app: A basic web app built in Iris for Go
  5. A mini social-network created with the awesome Iris💖💖
  6. Iris isomorphic react/hot reloadable/redux/css-modules starter kit
  7. ionutvilie/react-ts: Demo project with react using typescript and Iris
  8. Self-hosted Localization Management Platform built with Iris and Angular
  9. Iris + Docker and Kubernetes
  10. nanobox.io: Quickstart for Iris with Nanobox
  11. hasura.io: A Hasura starter project with a ready to deploy Golang hello-world web app with IRIS

似たようなものを開発しましたか? 私たちにも教えてください!

ミドルウェア

Irisはあなたのウェブアプリケーションにご使用いただけるハンドラー[1][2]を多く有しています。さらに、net/httpと互換性のある外部のミドルウェアもご使用いただけます。examples/convert-handlersを参照してください。

Irisは他のフレームワークと異なり、標準パッケージと100%互換性があります。故に、米国の有名なテレビ局を含め、大企業のの大半がGoをワークフローに取り入れています。Irisは常にGo言語の最新版リリースに対応し、Goの作成者によって開発されている標準的なnet/httpパッケージに沿っています。

記事

動画

雇用

多くの企業やスタートアップがIrisの使用経験を有するGo言語開発者を探しています。私たちは募集情報を毎日検索し、facebook pageに投稿しています。既に投稿されている情報をご覧ください。Likeを押して通知を受け取りましょう。

ライセンス

Iris3-Clause BSD Licenseに基いています。Irisは完全無料のオープンソースソフトウェアです。

ライセンスに関するご質問はe-mailまでご連絡ください。

Go
1
https://gitee.com/fengzhitalker/iris.git
git@gitee.com:fengzhitalker/iris.git
fengzhitalker
iris
iris
master

搜索帮助