All Projects → go-ego → Ego

go-ego / Ego

Licence: mit
Ego is a full-stack web framework written in Go, lightweight and efficient front-end component solutions, based on gin. The front-end is compiled, does not affect the back-end.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Ego

Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+11568.65%)
Mutual labels:  middleware, framework, web-framework, server
Dragon
⚡A powerful HTTP router and URL matcher for building Deno web servers.
Stars: ✭ 56 (-69.73%)
Mutual labels:  middleware, framework, server
Golf
⛳️ The Golf web framework
Stars: ✭ 248 (+34.05%)
Mutual labels:  middleware, framework, server
Pure Http
✨ The simple web framework for Node.js with zero dependencies.
Stars: ✭ 139 (-24.86%)
Mutual labels:  middleware, framework, server
Vapor
💧 A server-side Swift HTTP web framework.
Stars: ✭ 21,194 (+11356.22%)
Mutual labels:  framework, web-framework, server
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Stars: ✭ 53,971 (+29073.51%)
Mutual labels:  middleware, framework, server
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc.
Stars: ✭ 1,557 (+741.62%)
Mutual labels:  middleware, web-framework, server
Clastic
🏔️ A functional web framework that streamlines explicit development practices while eliminating global state.
Stars: ✭ 131 (-29.19%)
Mutual labels:  middleware, web-framework
Go Xserver
Go 服务器框架(go-x.v2)
Stars: ✭ 137 (-25.95%)
Mutual labels:  framework, server
Trails
🌲 Modern Web Application Framework for Node.js.
Stars: ✭ 1,688 (+812.43%)
Mutual labels:  framework, web-framework
Siris
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Stars: ✭ 146 (-21.08%)
Mutual labels:  framework, web-framework
Chicagoboss
Erlang web MVC, now featuring Comet
Stars: ✭ 1,825 (+886.49%)
Mutual labels:  framework, web-framework
Flamingo Commerce
Flexible E-Commerce Framework on top of Flamingo. Used to build E-Commerce "Portals" and connect it with the help of individual Adapters to other services.
Stars: ✭ 151 (-18.38%)
Mutual labels:  framework, web-framework
Uadmin
The web framework for Golang
Stars: ✭ 127 (-31.35%)
Mutual labels:  framework, web-framework
Ocpp
Python implementation of the Open Charge Point Protocol (OCPP).
Stars: ✭ 127 (-31.35%)
Mutual labels:  framework, server
Foxify
The fast, easy to use & typescript ready web framework for Node.js
Stars: ✭ 138 (-25.41%)
Mutual labels:  middleware, framework
Denovel
A Deno Framework For Web Artisan - Inspired by Laravel
Stars: ✭ 128 (-30.81%)
Mutual labels:  framework, web-framework
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-31.89%)
Mutual labels:  middleware, framework
Webgo
A minimal framework to build web apps; with handler chaining, middleware support; and most of all standard library compliant HTTP handlers(i.e. http.HandlerFunc).
Stars: ✭ 165 (-10.81%)
Mutual labels:  middleware, web-framework
Goat
[DEPRECATED] 🐐 A minimalistic JSON API server in Go
Stars: ✭ 161 (-12.97%)
Mutual labels:  middleware, framework

Ego

Build Status codecov CircleCI Status Go Report Card GoDoc Release Join the chat at https://gitter.im/go-ego/ego

Ego is a full-stack web framework written in Go, lightweight and efficient front-end component solutions, based on gin. The front-end is compiled, does not affect the back-end.

This is a work in progress.

简体中文

Contents

Docs

Requirements:

Go Version ≥1.7

Installation:

go get github.com/go-ego/ego

Update:

go get -u github.com/go-ego/ego  

Build-tools

go get -u github.com/go-ego/re 

re new

To create a new Ego web application

$ re new my-webapp

re run

To run the application we just created, you can navigate to the application folder and execute:

$ cd my-webapp && re run

Examples:

Router

package main

import (
	"github.com/go-ego/ego"
)

func main() {

	router := ego.Classic()
	ego.UseRenders()

	router.GlobHTML("views/html/*")

	parArr := [5]int{1, 2, 3, 4, 5}
	router.Ego("/head/", "head/head.html", ego.Map{
		"head":   "Test to load the HTML template",
		"parArr": parArr,
	})

	router.Run(":3100")
}

icon.vgo

// pkg icon

<div class="icon">
	<i class="iconfont {vclass}" {node}></i>
	<p>{prpo}</p>
</div>

<style>

.header-left{
	float:left;
}

.header-right{
	float:right;
}

.iconfont {
  position: relative;
  font-size:24px
}
</style>

head.vgo

import (
	"icons"
	icon "icons/icon.vgo"
	)

<div class="head">
	<div>ego:{{.head}}</div>

	<icon>
		vclass={icon-share-to}
		node={ id="slot1"}
		prpo={node---1}
	</icon>

	<div>
		{{range .parArr}}
	        <p>arr::: {{.}}</p>
		{{end}}
	</div>

</div>

Renderings:

TestRestful


package main

import (
	"github.com/go-ego/ego"
)

const httpUrl string = "http://127.0.0.1:3000"

func main() {

  router := ego.Classic()

  router.Static("/js", "./views/js")
  router.Static("/src", "./views/src")
  router.GlobHTML("views/html/*")

  strUrl := httpUrl + "/test/hlist"
  paramMap := ego.Map{
    "lon":  "10.1010101",
    "lat":  "20.202020",
    "type": "1",
  }
  router.TestHtml(strUrl, paramMap) // http url, http parameter, args (optional parameters): The default is "data".

  router.Run(":3100")
}

Renderings:

More instructions

Plans

  • Compression and merge css/js
  • CSS Preprocessing
  • Try supports MVVM and vdom
  • Update web framework

Donate

Contributing

License

Ego is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].