First, be clear: the direct use localhost ip address and can not use the sub-domain
Primary Domain Name achieve
First, do a configuration, the local host mapping a domain name
SERVER_NAME option is specified in the config app for domain configuration: port number
Start flask program, visit
Subdomain achieve
By subdomain in the blueprint to specify subdomain
Mapping subdomain in local host file
access