Your machine/server has more than 1 physical interface (ethernet, wifi or 3G/4G)
sudo lspci
sudo lspci -s <03:00> -vv | grep Lnk
{ | |
"name": "appsrv", | |
"version": "1.0.0", | |
"description": "Blueprint for node web application server", | |
"main": "index.js", | |
"dependencies": { | |
"koa": "^0.21.0", | |
"koa-body": "^1.2.1", | |
"koa-compress": "^1.0.8", | |
"koa-csrf": "^2.3.0", |
height: 800 |
height: 960 |
@credit Yan Zhu (https://github.com/nina-zhu)
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions, it can help you get your Python application or website off the ground. Flask includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server is required.
In this guide, we will demonstrate how to install and configure some components on Ubuntu 14.04 to support and serve Flask applications. We will configure the uWSGI application container server to interface with our applications. We will then set up Nginx to reverse proxy to uWSGI, giving us access to its security and performance features to serve our apps.
“It ain’t what you don’t know that gets you in trouble. It’s what you know for sure that just ain’t so.” -- Mark Twain
http://ark.intel.com/products/53449/Intel-Core-i5-2415M-Processor-3M-Cache-up-to-2_90-GHz
64-bit, 2-core, 4-thread, 8G 1333MHz DDR3 2-channel, 2.3 ~ 2.9 GHz, GPU 650 MHz ~ 1.3 GHz dual monitor
@credit Yan Zhu (https://github.com/nina-zhu)
Before you start this guide, you should run through the "How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04" guide. This is necessary in order to set up virtualenv, uWSGI and Nginx. In that guide, we developed a very simple flask application having just 1 file "firstflask.py" with only 9 lines of code, it is a sample for showing you the general steps. In this guide, we will create a complete user session listing application, with login, logout functionality. We will use MariaDB to store the users records, and use Redis to store the session data and background tasks.
Let's get started.
@credit Yan Zhu (https://github.com/nina-zhu)
Jersey is the most popular amongst Restful web service development. Latest Jersey 2.x version has been developed by Oracle/Glassfish team in accordance with JAX-RS 2.0 specification. Earlier Jersey 1.x version was developed and supported by Oracle/Sun team.
Latest Jersey release version is 2.25 see here and look documentation and API for details. We will implement a Jersey example in this article based on latest 2.x version.
In this article, we will use Hibernate's rich API to interact with MariaDB database or in general any ORM compliant database. We will create a