Out of the box Feathers NeDB does not support fuzzy search. There is a hook that provides this functionality: feathers-nedb-fuzzy-search. It is really simple and straitforward to install and use.
npm install feathers-nedb-fuzzy-search --save
Enable it for specifc services or alternatively enable it for all services in app.hooks.
const search = require('feathers-nedb-fuzzy-search')
const messages = app.service('messages')
$search: 'some string to search for'
Feathers is a very cool framework to quickly and easily setup API’s. Version 3 comes with a very cool CLI that generates all the scafolding code for you and makes it extremely easy to add services, hooks, etc. One thing that is missing is hot reloading to simplify the development proces. This is were nodemon comes to the rescue.
nodemon is a tool that helps developing node.js based applications by automatically restarting the node application when file changes in the directory are detected.
Setting nodemon up with Feather and Webpack si a simple two step proces.
- Install nodemon
npm install --save-dev nodemon
- Add one line to the scripts section of Webpacks package.json file
"test": "npm run eslint && npm run mocha",
"dev": "node ./node_modules/nodemon/bin/nodemon.js src/",
"eslint": "eslint src/. test/. --config .eslintrc.json",
"start": "node src/",
"mocha": "mocha test/ --recursive"
Now start Feathers using the following command.
npm run dev
That’s it, simple right?