Apache instead of Node

Hi. Is it possible to run the Maps SDK for Web on Apache, rather than node.js?
I didn’t find any such documentation on the web.

It can run on any http server.

1 Like

I though it can, the problem is that I had to follow the installation instructions for node.js which were 100% plug+play with even an automated process that installs and even launches the browser in the examples page. But for a manual install on apache, I’m having to “debug” for dependencies and it’s still not working. Is there no documentation for a manual install somewhere? Such as a list of dependencies and perhaps config requirements for the web environment offered by the server?

What dependencies do you have in mind? This SDK is written in JS and works on client side, so the http server only needs to serve files.

1 Like

Thanks for the response. Occasionally, the developers assume that the server’s environment will be configured in a certain way, when it not always the case.
These two screenshots are from the reverse-geocode.html example.
View on the node.js server it seems fine. Viewed on Apache, you just see a blank page.
It might be to do with something as simple as the API Key not being set properly in the manually configured Apache installation of the SDK.

Any details in the console?


Yeah, just as I had suspected initially… API Key issue

You see, with a manual install, the developer does not know in which files of the installation the real API key should be entered.
I’m tempted to just go and do an "egrep -ri ‘api key’ " on the whole tomtom directory structure on the dev server, but I hate “hacking” like that in what is going to become a key part of a tracking system…

We provide multiple tutorials, also Downloads page also helps to start with the SDK. This file that you are running is from our offline examples set, which contains README in the root directory - running this from nodejs is just one of the options.

Yeah, but the README.md only contains the steps needed to run the offline SDK on the node.js server and it really is a dead simple and flawless process.
However, for a manual installation on an alternative server I would need to reverse engineer the node.js setup scripts, in order to see where the API key needs to be entered.


I found the following solution…
First I edited the config.json and replaced my real API keys. I then ran the “npm install” etc.
This prepares a directory “dist” for node.js, which I am now serving as a standard Apache directory with Alias /tt/ and <Directory /path/to/tomtom/nodejs/dist>

It seems to have worked!
Thanks for the input, Przemek!