Camel – A pure Perl web server

To refresh my Perl skills, I wrote a web server in Perl. I called it as ‘Camel Server’. Camel Server has following features:

  • Support HTTP GET/POST/HEAD methods.
  • Support multi-processes.
  • Support any static text pages.
  • Support PERL files execution.
  • Support default pages.
  • Support Form & CGI parameters.
  • Support XML configuration.
  • Support Authentication & Session management page per page.
  • Certified by Perl Testing framework (of course it is not bug-free!)

You can refer to its README file for more details. https://github.com/luohuahuang/Camel/blob/master/README.md

In this page, I will introduce Camel’s filesystem and recipes.

Filesystem:

bin – it contains script to start Camel Server.

conf – it contains .xml configuration files to configure authentication and server setting.

lib – it is the core component of Camel.

camelauth.pm – for authentication

camelcgi.pm – for CGI & parameters pass

camelhttp.pm – main module. Server will be started here and listen/receive requests

camellogger.pm – utility to log logs

camelutils.pm – utility subroutines

camelxml.pm – XML engine. It takes care of XML interactive.

t – it contains testing cases

temp – it is a temporary working directory. Camel requires temp directory to handle .pl execution.

webapps – the root directory of apps.

firstapp – it is a demo apps.

manager – it is the administrator apps shipped with Camel Server. You can not delete it. Currently it has only one page named as login_portal.pl. It is the core .pl page to implement Authentication. In future releasing, I will add more utility pages under manager directory.

logs – it contains the logs file logged by camellogger.pm

Recipes:

The followings are my posts about Camel Server. You might find some useful recipes.