This is by you would probably go for a library like express.js - which
will already have this problem cracked. I can't describe how as I have
only just started using it, but I know you would have a rather large
routing config file.


IIRC, all the Express.js examples I've seen use inline JavaScript to
perform routing as opposed to a "large routing config file". For example:

var express = require('express');var app = express();

app.get('/', function(req, res){
res.send('hello world');});

app.listen(3000);


In that example, it appears that any "GET" request to the ROOT URL "/" is
routed to a JavaScript function which sends "hello world".

How would you manage 20,000+ URLs? Restart your "service" each time you add
a new route to inline code?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.