FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Experimental DBF Test Project with Node.js
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Experimental DBF Test Project with Node.js
Posted: Tue Nov 25, 2025 11:09 PM

This is a simple test project that allows you to read and display a .DBF file in the browser using Node.js – no PHP or external web server required.

The folder includes:

node.exe β†’ a portable version of Node.js (no installation needed)

server.js β†’ serves the HTML and handles API requests

readdbf.js β†’ a minimal DBF reader written in pure JavaScript (converted from php4dbf)

read_dbf.html β†’ browser interface to view records

STAFF.DBF β†’ sample database file

start-server.bat β†’ double-click to launch (http://localhost/)

💡 Background

The file readdbf.js is a direct translation of classic PHP logic from php4dbf, rewritten in pure JavaScript for Node.js.
This project demonstrates:

how easily structured DBF access can be achieved without PHP

how xBase-style data can be integrated into modern web environments

that it's possible to view DBF data in the browser without any database server

📦 License & Disclaimer

This is an experimental demo only – not production-grade code.
node.exe is the unaltered portable version of Node.js from https://nodejs.org, included for convenience (offline/local testing).

Use at your own discretion.

https://clipper2web.com/downloads/nodetests.zip

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Experimental DBF Test Project with Node.js
Posted: Wed Nov 26, 2025 04:07 AM

Dear Otto,

On this case I think that Charly's HIX is a much better and simpler solution for Harbour developers :idea:

https://github.com/carles9000/hix

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Experimental DBF Test Project with Node.js
Posted: Wed Nov 26, 2025 05:16 PM

Dear Antonio,
I have to maintain my mod_harbour server after quite some time.

Just out of curiosity: is HIX compatible with the classic mod_harbour version?
I’m hosting

https://puon24.com

on this server β€” the entire site is built with mod_harbour.
Since I’ve been running this site for years, it would definitely be interesting for the community to see how a project of this size feels when running on HIX.
Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Experimental DBF Test Project with Node.js
Posted: Wed Nov 26, 2025 08:57 PM

Dear Otto,

Could you provide a list of all the mod_harbour functions that you use ?

We will provide a compatibility layer :wink:

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Experimental DBF Test Project with Node.js
Posted: Thu Nov 27, 2025 09:24 AM

Dear Antonio, Many thanks again for the offer to port the code. After a brief evaluation, I decided not to refactor Apache and mod_harbour, but instead to deploy an updated Apache version 1:1 on the target server. The system was immediately back up and running, which makes this the most economical solution for now.

An additional observation: previously the server was running under the XAMPP edition of Apache. In that setup, XAMPP opens the ports for you and abstracts a lot of details away β€” which means you don’t consciously notice how many external requests and automated probes are hitting the server at all times. With the standalone Apache installation, the situation becomes much more transparent.

It was striking to see that within just a few seconds the first automated bots started hitting the server. This clearly shows that a Windows server can hardly be exposed β€œnaked” to the internet anymore without some form of protective layer. Without Cloudflare or a similar service, a lot of this traffic would have reached the server unchecked; with Cloudflare in place, a large portion was already filtered out.

If you run the server behind Cloudflare β€” including proxying, bot protection, rate limiting, and WAF β€” you effectively reach the same security level you would expect from a professional web hosting provider. The advantage is that the actual server remains fully shielded and is no longer directly visible to the outside world.

Best regards, Otto

Continue the discussion