Category: Nodejs

  • Bing Search API with NodeJS

    Bing provides a search API by which you can use the power of bing search in your own application. The base URL for the search API is: https://api.cognitive.microsoft.com/bing/v7.0/search The code to integrate the API using Express and Node JS is: The API Subscription Key can be created at the website: https://azure.microsoft.com/en-in/services/cognitive-services/bing-web-search-api/ If you want more […]

  • Introducing Socket.io

    Socket.io Web applications, for example, Facebook, Twitter, or Gmail are consolidating constant abilities, which empower the application to consistently give the client as of late refreshed data. When you include the Socket.io module, it provides you with two objects: a socket server object that is responsible for the server functionality and a socket client object […]

  • Meteor Methods vs REST API

    Many of you must have used MeteorJS Methods and have often mistook them for an analogue of REST API. Although Meteor Methods are similar to POST API request but they are quite different. The main difference between the two is that Meteor Methods are DDP (Distributed Data Protocol) messages and are based on RPC (Remote Procedure […]

  • File Structure in Meteor App

    The four basic types of directories that must be defined inside any Meteor App are /client,/server, /public and /lib. These directories are special and when it comes to coding, Meteor has few rules: Code inside /server directory only runs on the server. Code inside /client directory only runs on the client. Everything else runs on […]

  • Why Meteor’s account-ui-bootstrap-3 {{loginButtons}} not displaying

    Sometimes this happens when you include both accounts-ui and accounts-ui-bootstrap-3 packages in your App. The standard package accounts-ui classes tends to overrides the CSS classes of bootstrap-3 styled “accounts-ui”. Just remove the standard package from your App by typing the following command in terminal: [cc lang=”javascript”] meteor remove accounts-ui [/cc] And you will see you {{loginButtons}} get appear […]

  • Hapijs – views

    There are two ways for rendering a view by using reply.view()interface, or by using view handler. – reply.view() [cc lang=”javascript”]server.route({ method: ‘GET’, path: ‘/’, handler: function (request, reply) { reply.view(‘index’); } });[/cc]   if you want to pass context to reply.view(), pass an object as the second parameter, for example: [cc lang=”javascript”]server.route({ method: ‘GET’, path: […]

  • HandleBars

    let’s see an example. [cc lang = “html”] <div class=”xyz”> <h1>{{title}}</h1> <div class=”body”> {{#noop}}{{body}}{{/noop}} </div> </div> [/cc] – The noop helper (short for “no operation”) will receive an options hash. This options hash contains a function (options.fn) that behaves like a normal compiled Handlebars template. >Specifically, the function will take a context and return a […]

  • How to install Meteor on your System

    Meteor’s install process is relatively simple and you can run it in less than five minutes. To begin with, if you’re using Mac OS or Linux you can install Meteor by running this command in Terminal Window. curl https://install.meteor.com | sh If you are running Windows, download .exe file from below link. https://install.meteor.com/windows or, refer […]

  • Build Your First HTTP Server in NodeJS

    In this tutorial, we will be talking about how we can set up a simple NodeJS HTTP server with a beginner’s perspective. NodeJS is a fantastic candidate for creating web servers which are light weight and can handle a very good volume of requests. NodeJS is shipped with several core modules out of which we […]

Click to Copy