Josh Kneale
Josh Kneale

Reputation: 31

Autocomplete + suggest search bar for nodejs express framework, using a mongodb database

I'm looking for an example to go off on how to setup a search bar for a project I'm working on.

I've got a mongodb database and am using nodejs with the express framework.

I'd like to have autocomplete and suggest functionality for the search bar.

I've had a look at typeahead.js but am overwhelmed by how to implement it. If anyone knows of a place to find a working version (that I can upload to my dev environment and take apart) or has the time to run be through it step by step, I'd be very grateful.

Alternatively if there is a much easier to achieve what I want to do, let me know.

Thanks in advance.

Upvotes: 2

Views: 6131

Answers (1)

wntwrk
wntwrk

Reputation: 327

My recent research has shown a blog post that might be of help. http://physalix.com/jquery-autocomplete-search-with-node-js-and-mongoose/

edit: Sorry for the brevity, unfortunately I am of novice level with node.js so I don't want to submit code directly on here as I cannot confirm it has been tested and will work.

The link above does look like it will work and has been vetted on the original article post as functional. As a general example I believe this will definitely lead you in the right direction to a functioning search bar with the functionality you require.

Note this doesn't implement typeahead.js but works in a similar fashion.

Upvotes: 1

Related Questions