📜 ⬆️ ⬇️

Ognelis as a development server

I just read an article about an example of using a telnet server in firefox and came across a comment by @merlin_rterm, who mentioned the POW extension, or Plain Old Webserver . This extension allows you to run server-side scripts using firebox. Further I will describe how to configure firewall for working with PHP and SQLite under Ubuntu. I think that for Mac and Windows, the instruction will not be much different.

Install POW


Download and install POW. After installing POW and restarting Firewall, it immediately becomes available at: http: // localhost: 6670 / . On the invitation page at the bottom there will be a link to the root directory of your server. I advise you to immediately make a link to it on the desktop. Suppose your server root directory is ~ / htdocs.

Install PHP


In order for PHP scripts to work, you need to install php-cgi or php-cli on the system and add this line to the ~ / htdocs / system / startup.sjs file:

<?sjs
pow_server.APP_HANDLERS['php'] = '/usr/bin/php';
?>


Naturally, check the path to the PHP executable file.
')
Well, lastly, I advise you to put the SQLite extension for PHP so that you can develop applications with a database.

Remarks


Naturally, the rules specified in .htaccess will not work. But there are some solutions. For rewrite, for example, you can use the rules described in the http://davidkellogg.com/wiki/Rewrite_rules documentation.

Conclusion


This example shows how easy it is to set up a development environment. If you competently abstract all calls to the database, cache, or just use a modern framework that does it for you, then you can write quite high-quality, full-fledged applications literally “on the knee”. And a separate bow to the developers of Ognelis.

Addition


As a client for SQLite, you can use the plugin for FireSite SQLite Manager

Source: https://habr.com/ru/post/49629/


All Articles