Skip to content
MVC web framework for Euphoria (
Eiffel E HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
include * Imported creole parser from Sep 8, 2019
.gitignore Create contributing document Jun 3, 2019 Create license document Jun 3, 2019
eu.cfg * Initial commit. Sep 23, 2018

Euphoria MVC

Euphoria MVC is a model-view-controller framework for Euphoria.

Project status

This project is in the very early stages of development. Things can and will break or change until we reach a stable release.



Build your views in HTML and then render your data to the page.


Automatically route static or dynamic paths to handler functions.


Execute queries on any (well, most) database systems from one codebase.


(Coming soon!)
Easily store and fetch Euphoria data via object-relation mapping (ORM).


Load and store data in configuration files.


Store snippits of data with your end users.


Store more data locally with minimal cookies.

Getting Started

This example assumes you are running Apache 2.4 on Linux and that you've already got a basic working web server.

Download Euphoria

wget "" -O euphoria-4.1.0-Linux-x64-57179171dbed.tar.gz
sudo tar xzf euphoria-4.1.0-Linux-x64-57179171dbed.tar.gz -C /usr/local/

Install Euphoria

cd /usr/local/bin/
sudo find /usr/local/euphoria-4.1.0-Linux-x64/bin/ -type f -executable -exec ln -s {} \;

Get Euphoria MVC

Check out euphoria-mvc into your project directory

git clone

Or if you're already using git, check out as a submodule.

git add submodule

Configure Euphoria

Update your eu.cfg to use euphoria-mvc/include.

-i euphoria-mvc/include

Update .htaccess

Tell Apache you want it to execute Euphoria scripts and use index.esp as the index.

AddHandler cgi-script .esp
Options +ExecCGI
DirectoryIndex index.esp

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.esp/$1 [L,NS]

You can also add a block like this to keep snoopers out of certain files:

<Files ~ ".cfg$|.err$|.edb$">
    Deny from all

Although the ideal solution would be to store sensitive data outside of your web root.

Write your template.

Save this as templates/index.html.

<!DOCTYPE html>
  <title>{{ title }}</title>
  <h1>{{ title }}</h1>
  <p>{{ message }}</p>

Write your application.

Save this as index.esp.


include mvc/app.e
include mvc/template.e
include std/map.e

function index( object request )

    map response = map:new()
    map:put( response, "title", "My First App" )
    map:put( response, "message", "Hello, world!" )

    return render_template( "index.html", response )
end function
app:route( "/", "index" )

-- "/" is the URL path, "index" is the name of the route
-- route() will find the matching routine automatically


Run your application

Open your web browser to your application URL.

You can’t perform that action at this time.