ref: b5391dd4db35c1aea6fe2e3f8967fd2f62f7b3bb bangin-server-node/README.md -rw-r--r-- 1.1 KiB
b5391dd4 — Sam A. Horvath-Hunt Don't encodeURI bangin's output 6 months ago


A basic web server around bangin written in Node.js.


  • Node.js 10+
  • bangin (in your $PATH)


Run the server with:

node index.js [port]

If no port is provided then it will default to 1234.

Requests must include a non-empty value at querystring q. The string will first be routed to bangin before, should that fail, falling back to DuckDuckGo.

The response if successful will be a 303 redirect that browsers can handle.


$ curl -I 'http://localhost:1234?q=x!aw'
HTTP/1.1 303 See Other
Location: https://wiki.archlinux.org/index.php?search=x

$ curl -I 'http://localhost:1234?q=x'
HTTP/1.1 303 See Other
Location: https://duckduckgo.com/?q=x

#Setting as the browser search engine


  1. Go to chrome://settings/searchEngines.
  2. Add a new search engine with the URL pointing to http://localhost:<port>/?q=%s.


Firefox does not yet support fully custom search engines. You can track the relevant issue here.