Ep. Io is a python-based cloud hosting service provider. Founder Andrew (main contributor to Django, the most fluent Python web framework), is currently supported at the technical level. Currently, this is an invitation. You need to send an email to him. He will activate it later.
Now let's take a look at how to write a hello World site on EP. Io. Because I don't like Django's heavy framework very much, I chose flask.
One step is to ensure that the following components are installed on your machine.
Sudo apt-Get git
Sudo apt-Get Python-pip
Sudo apt-Get openssh-Client
Install the epio management component
PIP install epio
The next step is the key SSH key that is important in the deploy process. If no SSH key is generated
Ssh-keygen
Run the following command to upload
Epio upload_ssh_key
If everything above is normal, you can start to write some flaskCode.
If flask is not installed locally, run the following command to install
PIP install flask
Create a folder
Mkdir EP
Create an app. py file with the following code:
FromFlaskImportFlask
APP = flask (_ Name __)
@ App. Route ('/')
DefIndex ():
Return 'Hello from flask! \ N'
If _ Name __='_ Main __':
App. Run (DEBUG = true)
Test locally to see if there are any problems.
Python app. py
If no problem exists, prepare the publishing file.
The first is epio. ini.
[Wsgi]
Entrypoint = app: app
Requirements = requirements.txt
This requirements file (requirements.txt) has only one line:
Flask
Now we can release our application.
Epio create [Optional appname]
Epio upload
Okay. You can access your application through http://appname.ep.io!