node package manager



wintersearch is a simple full-text search engine for wintersmith, a static website generator written for node.js.


npm install -g wintersearch


To start, clone the GitHub repo or otherwise download the example. Then, from within the example folder, run

wintersearch preview

...and visit http://localhost:8000/search.html. You'll see a modified version of the wintersmith blog template and a functional instant search box.

To use wintersearch on a live webserver, run wintersearch from within your project folder to start the search engine (you'll probably want to use some kind of mechanism to ensure that it stays running constantly). In order to access the server from the web, configure a reverse proxy to wintersearch on port 3000. Here's an example for lighttpd:

$HTTP["url"] =~ "/search/" {
	proxy.server = ( "" => ( ( "host" => "", "port" => 3000 ) ) )

The server only indexes content upon startup, so you'll need to restart it after making a change to the site content in order to index the new text. Also, it presently only looks at text in files.

How it works

wintersearch preview launches the wintersmith preview server on port 8080, the wintersearch engine on port 3000, and starts a proxy server on port 8000. This allows you to test your wintersmith site and the wintersearch engine simultaneously. wintersearch just starts the wintersearch engine on port 3000.

Note: at the moment, these port numbers are hard-coded but these will configurable in the future.

wintersearch is made possible by a bunch of great projects: