{"id":15661325,"url":"https://github.com/code-hex/echo-static","last_synced_at":"2025-06-22T23:02:20.311Z","repository":{"id":57485629,"uuid":"78724032","full_name":"Code-Hex/echo-static","owner":"Code-Hex","description":"Static middleware for echo web framework(golang)","archived":false,"fork":false,"pushed_at":"2017-01-13T09:21:51.000Z","size":10,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T00:06:44.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code-Hex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-12T08:32:35.000Z","updated_at":"2021-09-26T11:25:59.000Z","dependencies_parsed_at":"2022-09-02T00:10:20.227Z","dependency_job_id":null,"html_url":"https://github.com/Code-Hex/echo-static","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fecho-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fecho-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fecho-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fecho-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/echo-static/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252583879,"owners_count":21771942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T13:27:06.128Z","updated_at":"2025-05-05T21:51:03.253Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"echo-static\n====\n[![Build Status](https://travis-ci.org/Code-Hex/echo-static.svg?branch=master)](https://travis-ci.org/Code-Hex/echo-static)\n[![Coverage Status](https://coveralls.io/repos/github/Code-Hex/echo-static/badge.svg?branch=master)](https://coveralls.io/github/Code-Hex/echo-static?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Code-Hex/echo-static)](https://goreportcard.com/report/github.com/Code-Hex/echo-static)\n[![GoDoc](https://godoc.org/github.com/Code-Hex/echo-static?status.svg)](https://godoc.org/github.com/Code-Hex/echo-static)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n# SYNOPSIS\n```go\npackage main\n\nimport (\n    static \"github.com/Code-Hex/echo-static\"\n \n    assetfs \"github.com/elazarl/go-bindata-assetfs\"\n    \"github.com/labstack/echo\"\n)\n\nfunc main() {\n    e := echo.New()\n\n    e.Use(static.ServeRoot(\"/static\", NewAssets(\"assets\")))\n    e.GET(\"/ping\", func(c echo.Context) error {\n        return c.String(200, \"test\")\n    })\n    // Listen and Server in 0.0.0.0:8080\n    e.Start(\":8080\")\n}\n\nfunc NewAssets(root string) *assetfs.AssetFS {\n\treturn \u0026assetfs.AssetFS{\n\t\tAsset:     Asset,\n\t\tAssetDir:  AssetDir,\n\t\tAssetInfo: AssetInfo,\n\t\tPrefix:    root,\n\t}\n}\n```\nand put your asset file in the `assets` directory and execute the following code before compile it.\n\n    go-bindata -o bindata.go assets/...\n\t\n# DESCRIPTION\n\necho-static is File server middleware for [go-bindata](https://github.com/jteeuwen/go-bindata) and [echo](https://github.com/labstack/echo).\n\n# INSTALLATION\n\n    go get github.com/Code-Hex/echo-static\n\n# AUTHOR\n\n[codehex](https://twitter.com/CodeHex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fecho-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fecho-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fecho-static/lists"}