Node.js htaccess like get rules

I am looking for a way to set dynamic url http://host.com/dynamic_value-123/ and be able to get these values (123)

Answers


Considering you have the most basic example of a server with Node.js, you can achieve that with req.url.split('-')[1]:

var http = require('http');
http.createServer(function (req, res) {
  console.log(req.url.split('-')[1]);
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8080);
console.log('Server running at http://127.0.0.1:8080/');

Need Your Help

c++, levmar optimization, lapack, tnt library

c++ visual-studio optimization lapack++

it would be kind of someone to help with the issue:

Jquery Dropdown menu with thumbnail Image

jquery html css drop-down-menu menu

how to make or any plugin available like this type of dropdown menu http://www.vivantabytaj.com (small images inside dropdown menu)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.