learning express route function
const express = require('express'); const app = express(); app.get('/', function (req, res) { res.send('root'); }); app.get('/about', function (req, res) { res.send('about'); }); app.get('/random.txt',function (req, res) { res.send('random.txt'); }); // abc abd app.get('/ab?cd',function (req, res) { res.send('ab?cd'); }); // abbcd abbbcd and so on app.get('/ab+cd', function (req, res) { res.send('ab+cd'); }); // adRANDOMcd app.get('/ab*cd', function (req, res) { res.send('ab*cd'); }); //. ade adcde app.get('/ab(cd)?e', function (req, res) { res.send("ab(cd)?e"); }); app.listen(3000,function () { console.log("learning express router"); });