Giter Site home page Giter Site logo

euweb's Introduction

OpenEuphoria's Web Application

Dependencies

Configuration

Read source/config.e. Create your own configuration file and include it from source/config.e inside an ifdef.

A sample config file might look like:

public constant DB_DRIVERS_PATH = "drivers"
public constant DB_URL = "mysql://user:password@localhost:3306/database_name"

-- Do NOT include the trailing slash
public constant ROOT_URL = "http://localhost"

public constant AUTO_LOGIN_UID = 0 -- 0 disables, otherwise set to your UID

-- reCAPTCHA keys
public constant RECAPTCHA_PRIVATE_KEY = ""
public constant RECAPTCHA_PUBLIC_KEY = ""

Create a eu.cfg file in the euweb/htdocs directory. It should have the following:

-batch
-i /path/to/euphoria/include
-p etml,etag:/dir/to/webclay/webclay/etml.ex
-i /path/to/edbi
-i /path/to/creole
-i /path/to/webclay
-i /path/to/euweb/source
-d <ifdef used in config.e>

This enables the webclay preprocessor and ensures that all of the include files can be found when running euweb. The preprocessor needs to be run by a user that can write the post processed files. The cgi process likely will not be running with those permissions. For the initial configuration, and any time any of the templates in euweb/source/templates change, you will probably need to execute euweb/htdocs/euweb.ex manually from the command line in order to reprocess the templates.

Database

euweb uses a MySQL database, so you'll need to have the MySQL server installed. The sql/euweb.sql file will create the database schema required, and adds a few users and a post, as well. It uses a database named euweb. To run it:

$ mysql -u <username> -p < euweb.sql

Apache

Configuration files can be in different places on different systems. This guide will assume the following files:

  • /etc/apache2/apache2.conf
  • /etc/apache2/sites-enabled/000-default

If you do not have the second, look for some lines like the following in apache2.conf:

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

The 000-default file should look like this:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost

  DocumentRoot /var/www/htdocs
  <Directory />
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  <Directory /var/www/htdocs>
    Options Indexes FollowSymLinks MultiViews ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    AddHandler cgi-script .ex
  </Directory>

  ErrorLog /var/log/apache2/error.log

  # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
  LogLevel warn

  CustomLog /var/log/apache2/access.log combined

</VirtualHost>

This assumes that /var/www/htdocs is the root directory from which apache will serve pages. You can simply make a symlink from /var/www to your euweb htdocs dir:

$ cd /var/www
$ sudo ln -s /dir/to/euweb/htdocs htdocs

.htaccess

euweb uses some rewrite rules to make some friendly urls through an .htaccess file. A default .htaccess is in the repository, though you can additionally configure it.

While developing and testing, your local IP may end up being in the banned list. If this happens, you can simply delete that line from the IP_BAN_LIST, or revert the file via svn (assuming you haven't changed anything else).

euweb's People

Contributors

cklester avatar ghaberek avatar j-x-brown avatar jcowgar avatar matthewwalkerlewis avatar ne1uno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.