Node js to return global variable set in callback function ERROR : var results=””; function getData() { var sql = require(“mssql”); var dbConfig={ server:”server”, database:
Author: admin
Protected: Zerodha
There is no excerpt because this is a protected post.
Mongoose Schema Basics
Understanding Schemas A "Schema" can be a tough thing to understand at first, but in reality it’s pretty straightforward. A Schema for a database is
Mongoose CRUD (Create, Read, Update, Delete)
We’ve covered the basics of making queries in the MongoDB Shell, but since we’ll mostly be writing our queries in our server’s JavaScript code using
MongoDB Overview – Install – Run
A database is simply a storage mechanism for information. In the same way a warehouse stores physical inventory in rows, on shelves, in boxes, etc.,
Express Router
You have now experienced the beauty and simplicity of Node and Express – and you have created a few simple back-end servers and enabled your
Var, let and const- what’s the difference?
Scope of var var declarations are globally scoped or function/locally scoped. It is globally scoped when a var variable is declared outside a function. This
Hashing passwords with NodeJS and MongoDB: bcrypt
Registration In the user registration process, we have to apply the password hasheado before storing it in the database. To do this, we use the
Node Inspector
In this section, we will use node inspector tool to debug a simple Node.js application contained in app.js file. var fs = require(‘fs’); fs.readFile(‘test.txt’, ‘utf8’,
Create HTTP Server in Nodejs
In this example a server has been created and response text displayed in browser, this code is pure nodejs , it means we dont have