NPM package

You can use itemsapi in your node.js app or just start a server in one file

varitemsapi=require('itemsapi');itemsapi.init({server:{port:5000},collections:{db:'json',filename:'./collections.json'},elasticsearch:{host:'localhost:9200'}})itemsapi.start(functionserverStart(serverInstance){varhost=serverInstance.address().address;varport=serverInstance.address().port;itemsapi.get('logger').info('ItemsAPI backend started on http://%s:%s',host,port)});