Experimental DBF Test Project with Node.js

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 100 times
Been thanked: 91 times
Contact:

Experimental DBF Test Project with Node.js

Post by Otto »

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

Image

User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Experimental DBF Test Project with Node.js

Post by Antonio Linares »

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
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 100 times
Been thanked: 91 times
Contact:

Re: Experimental DBF Test Project with Node.js

Post by Otto »

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

User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: Experimental DBF Test Project with Node.js

Post by Antonio Linares »

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
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 100 times
Been thanked: 91 times
Contact:

Re: Experimental DBF Test Project with Node.js

Post by Otto »

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

Post Reply