Creating a local hostname instead of localhost?

My flash application is currently running locally:

http: // localhost: 5000 / some_page

How to create a local user location for my application, for example:

http: // myappname / some_page

Refers to the local domain name. Is it even possible? Any pointers would be great.

+4
source share
2 answers

In order for the browser to resolve this custom name, you need to add an alias to your / etc / hosts file . It probably already contains a line around 127.0.0.1, in which case you just add your alias to the list

127.0.0.1 localhost localhost.localdomain myappname

, .

app.config['SERVER_NAME'] = 'myappname:5000'

( root sudo) , 80, .

+7

SERVER_NAME config:

app = Flask(__name__)
app.config['SERVER_NAME'] = 'myappname:80'

: http://flask.pocoo.org/docs/0.10/config/

0

All Articles