Example Applications
Below is list of example applications you can use to get started. They are generated with Fano CLI, command line tools to help scaffolding web application with Fano Framework.
Hello World applications
List of getting started web application for various supported protocol, i.e CGI, FastCGI, SCGI, uwsgi and http.
- Basic CGI web application example. View video tutorial.
- Fano Fcgid.
- Example FastCGI/CGI web application which can be deployed as FastCGI with mod_fcgid or as CGI.
- Example FastCGI web application listen on Unix domain socket.
- Example FastCGI web application listen on TCP port. View Scaffold FastCGI web application video tutorial
- Example web application using scgi protocol.
- Example web application using uwsgi protocol. View step by step video tutorial.
- Example web application using http protocol.
MIME types web application
Following example applications show how to work with response other than HTML page, such as image, PDF and JSON data.
- Image generator CGI web application shows how to output image that is generated on-the fly. View video tutorial
- Fano Api demonstrates how to return JSON response.
- Fano Pdf demonstrates how to generate PDF document on the fly. View step by step video tutorial.
MVC web application
Fano Mvc demonstrate how to separate logic of application using Model, View, Controller. It also demonstrates how to use HTML view template to compose application UI layout.
File upload
Handling upload example shows how to handle file upload in Fano Framework. For file upload validation example, read Form Validation section below.
Database
Following example applications show how to work with SQL and NoSQL databases by modelling data as model.
- Example web application that load data from Elasticsearch
- Example SCGI web application that load data from Elasticsearch
- MySQL web application example
- Database connection pool example
- PostgreSQL web application example
- Example web application that log messages to MySQL database. This example demonstrates logging functionality in Fano Framework.
Middleware
Example web application using middleware demonstrates how to use middleware to protect one or more application routes.
Working with Session
Following example applications demonstrate how to use session with Fano Framework to allow user to login and logout web application.
- Session example demonstrates how to use session that is stored in file on server.
- Session in encrypted cookie example demonstrates session that is stored in encrypted cookie.
- Session in database example demonstrates session that is stored in MySQL database.
Cross-Origin Resource Sharing (CORS)
Cross-Origin Resource Sharing (CORS) example demonstrates how to add CORS headers to web application.
Cross-Site Request Forgery (CSRF) protection
Cross-Site Request Forgery (CSRF) protection example demonstrate how to protect application from CSRF attack.
Form validation
- Form Validation example demonstrate how to use Fano Framework input validation feature.
- File upload validation example demonstrate how to use Fano Framework input validation feature to validate file upload using various validation rules.
- Input validation example web application demonstrates how to validate latitude and latitude value.
HTTP Verb tunneling examples
HTTP verb tunnelling example application demonstrate how to use HTTP verb tunneling when application behind strict firewall policy.
HTTP Authentication examples
- HTTP Basic Authentication example application demonstrates how to use HTTP Basic Authentication (RFC 2617) in Fano Framework.
- HTTP Bearer Authentication with JWT demonstrates how to use JWT (RFC 7519) to sign and verify JWT token in Fano Framework.
Handling request with JSON body
Fano Json Request demonstrates how to handle request with JSON body.
HTTP cache header examples
Fano Cache Control demonstrates how to add HTTP cache header.
Send email examples
Fano Email demonstrates how to send email while Fano mail logger demonstrates writing log to email address.
Password hash examples
Fano Password example demonstrates how to verify plain password against password hash. It is similar to session-related examples above but it compares password using password hash verification.
User-agent examples
Fano User-Agent demonstrates how to work with user-agent to identify client browser, device type or operating system.
IPv6 address examples
Fano Ipv6 and Fano MhdIpv6 example applications demonstrate how to use IPv6 address.
Logger
Fano mail logger demonstrates writing log to email address. While Fano Db logger example web application demonstrates how to log messages to MySQL database. These examples demonstrate logging functionality in Fano Framework.
Rate-limit
Rate-limiting demo application demonstrates how to limit number of request a client can make. View video tutorial. Rate-limiting with MySQL demo application is similar except that it stores request states in MySQL database instead of memory.