_examples/

directory
v0.0.0-...-0a1b186 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2017 License: BSD-3-Clause

README

Examples

Please do learn how net/http std package works, first.

This folder provides easy to understand code snippets on how to get started with ion micro web framework.

It doesn't always contain the "best ways" but it does cover each important feature that will make you so excited to GO with ion!

Overview
HTTP Listening
Configuration
Routing, Grouping, Dynamic Path Parameters, "Macros" and Custom Context
Subdomains
Convert http.Handler/HandlerFunc
View
Engine Declaration
template/html ion.HTML(...)
django ion.Django(...)
handlebars ion.Handlebars(...)
amber ion.Amber(...)
pug(jade) ion.Pug(...)
Authentication
File Server
How to Read from context.Request() *http.Request

The context.Request() returns the same *http.Request you already know, these examples show some places where the Context uses this object. Besides that you can use it as you did before ion.

How to Write to context.ResponseWriter() http.ResponseWriter

The context.ResponseWriter() returns an enchament version of a http.ResponseWriter, these examples show some places where the Context uses this object. Besides that you can use it as you did before ion.

Miscellaneous
More

https://github.com/get-ion/ion/tree/master/middleware#third-party-handlers

Testing

The httptest package is your way for end-to-end HTTP testing, it uses the httpexpect library created by our friend, gavv.

Example

Caching

ion cache library lives on its own package: https://github.com/get-ion/cache it contains examples

Sessions

ion session manager lives on its own package: https://github.com/get-ion/sessions it contains examples

You're free to use your own favourite sessions package if you'd like so.

Websockets

ion websocket library lives on its own package: https://github.com/get-ion/websocket it contains examples

You're free to use your own favourite websockets package if you'd like so.

Typescript Automation Tools

typescript automation tools have their own repository: https://github.com/get-ion/typescript it contains examples

I'd like to tell you that you can use your favourite but I don't think you will find such a thing anywhere else.

Hey, You!

Developers should read the godocs for a better understanding.

Psst, I almost forgot; do not forget to star or watch the project in order to stay updated with the latest tech trends, it never takes more than a second!

Directories

Path Synopsis
authentication
configuration
convert-handlers
file-server
http-listening
listen-letsencrypt
Package main provide one-line integration with letsencrypt.org
Package main provide one-line integration with letsencrypt.org
http_request
read-form
package main contains an example on how to use the ReadForm, but with the same way you can do the ReadJSON & ReadJSON
package main contains an example on how to use the ReadForm, but with the same way you can do the ReadJSON & ReadJSON
http_responsewriter
miscellaneous
subdomains
single
Package main register static subdomains, simple as parties, check ./hosts if you use windows
Package main register static subdomains, simple as parties, check ./hosts if you use windows
wildcard
Package main an example on how to catch dynamic subdomains - wildcard.
Package main an example on how to catch dynamic subdomains - wildcard.
www
testing
tutorial
url-shortener
Package main shows how you can create a simple URL SHortener.
Package main shows how you can create a simple URL SHortener.
view
template_html_3
Package main an example on how to naming your routes & use the custom 'url path' HTML Template Engine, same for other template engines.
Package main an example on how to naming your routes & use the custom 'url path' HTML Template Engine, same for other template engines.
template_html_4
Package main an example on how to naming your routes & use the custom 'url' HTML Template Engine, same for other template engines.
Package main an example on how to naming your routes & use the custom 'url' HTML Template Engine, same for other template engines.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL