Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. Some of the features of mocha are as follow: simple async support, including promises. async test […]
Postman is mostly used app for developing and testing API .Postman is a free app which is available for MacOS,Windows,Linux and Chrome app.It is used to you to create, save, send HTTP requests and test the response data.It helps to automate the process of making API requests and testing API responses.There are various features which […]
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 […]
If you create Meteor project from scratch(i.e using meteor create), it will automatically have the autopublish package enabled. The goal of autopublish package is to make it very easy to start coding with Meteor, and it does this by automatically mirroring all the data from the server to client, thus taking care of publications and subscriptions for you. Suppose you […]
Meteor’s security system allows us to control database modification without having to define Methods every time we want to make changes. We didn’t really need to create new Methods for updating and deleting data in database. We just needed to check if the user had permission to do these actions, and this was made easy […]
Talking about packages in regard of Meteor is different from other languages. Meteor uses five basic types of packages. Meteor platform packages : The Meteor core itself is split into different Meteor packages. They are included in every Meteor App and you do not need to explicitly add these. Regular Meteor packages : These are also known […]
There are numerous cases where we need to convert our objects to JSON using JSON.stringify and there are also several cases where we need to have the output JSON to be formatted for easy readability. For the above-mentioned purpose JSON.stringify(…) function has support to format the output if required. It takes special arguments for this purpose. JSON.stringify Signature [cc lang=”javascript”] JSON.stringify(value[, replacer[, space]]) [/cc] Here […]
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: […]