mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded
Former-commit-id: da4f38eb9034daa49446df3ee529423b98f9b331
This commit is contained in:
28
_examples/subdomains/multi/hosts
Normal file
28
_examples/subdomains/multi/hosts
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright (c) 1993-2009 Microsoft Corp.
|
||||
#
|
||||
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
|
||||
#
|
||||
# This file contains the mappings of IP addresses to host names. Each
|
||||
# entry should be kept on an individual line. The IP address should
|
||||
# be placed in the first column followed by the corresponding host name.
|
||||
# The IP address and the host name should be separated by at least one
|
||||
# space.
|
||||
#
|
||||
# Additionally, comments (such as these) may be inserted on individual
|
||||
# lines or following the machine name denoted by a '#' symbol.
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# 102.54.94.97 rhino.acme.com # source server
|
||||
# 38.25.63.10 x.acme.com # x client host
|
||||
|
||||
# localhost name resolution is handled within DNS itself.
|
||||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
#-iris-For development machine, you have to configure your dns also for online, search google how to do it if you don't know
|
||||
|
||||
127.0.0.1 domain.local
|
||||
127.0.0.1 system.domain.local
|
||||
127.0.0.1 dashboard.domain.local
|
||||
|
||||
#-END iris-
|
||||
41
_examples/subdomains/multi/main.go
Normal file
41
_examples/subdomains/multi/main.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/context"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
|
||||
/*
|
||||
* Setup static files
|
||||
*/
|
||||
|
||||
app.StaticWeb("/assets", "./public/assets")
|
||||
app.StaticWeb("/upload_resources", "./public/upload_resources")
|
||||
|
||||
dashboard := app.Party("dashboard.")
|
||||
{
|
||||
dashboard.Get("/", func(ctx context.Context) {
|
||||
ctx.Writef("HEY FROM dashboard")
|
||||
})
|
||||
}
|
||||
system := app.Party("system.")
|
||||
{
|
||||
system.Get("/", func(ctx context.Context) {
|
||||
ctx.Writef("HEY FROM system")
|
||||
})
|
||||
}
|
||||
|
||||
app.Get("/", func(ctx context.Context) {
|
||||
ctx.Writef("HEY FROM frontend /")
|
||||
})
|
||||
// http://domain.local:80
|
||||
// http://dashboard.local
|
||||
// http://system.local
|
||||
// Make sure you prepend the "http" in your browser
|
||||
// because .local is a virtual domain we think to show case you
|
||||
// that you can declare any syntactical correct name as a subdomain in iris.
|
||||
app.Run(iris.Addr("domain.local:80")) // for beginners: look ../hosts file
|
||||
}
|
||||
BIN
_examples/subdomains/multi/public/assets/images/test.ico
Normal file
BIN
_examples/subdomains/multi/public/assets/images/test.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
_examples/subdomains/multi/public/upload_resources/favicon.ico
Normal file
BIN
_examples/subdomains/multi/public/upload_resources/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user