XML Sitemaps

XML Sitemaps

DOWNLOAD PLUGIN Description Use this plugin to greatly improve SEO to create special XML sitemaps which will help search engines like Google, Bing, Yahoo and Ask.com to better index your site. With such a sitemap, it’s much easier for the crawlers to see the complete structure of your site and retrieve it more efficiently. The plugin supports all kinds of WordPress generated pages as well as custom URLs. Additionally it notifies all major search engines every time you create a post about the new content. Supported since over 9 years and rated as the WordPress plugin, it will do exactly…
Read More
WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager

WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager

DOWNLOAD PLUGIN Description Insert Headers & Footers + Full WordPress Code Snippets Plugin (formerly known as Insert Headers and Footers by WPBeginner) is the most popular code snippets plugin for WordPress used by over 1 million websites. We make it easy for you to add code snippets in WordPress without having to edit your theme’s functions.php file. Our simple insert headers and footers interface allows you to insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site’s header and footer as well other areas of your website. No need to edit your theme files! Aside…
Read More
Node.js Modules

Node.js Modules

What is a Module in Node.js? Consider modules to be the same as JavaScript libraries. A set of functions you want to include in your application. Built-in Modules Node.js has a set of built-in modules which you can use without any further installation. Look at our Built-in Modules Reference for a complete list of modules. Include Modules To include a module, use the require() function with the name of the module: var http = require('http'); Now your application has access to the HTTP module, and is able to create a server: http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello World!');…
Read More
Node.js File System

Node.js File System

Node.js as a File Server The Node.js file system module allows you to work with the file system on your computer. To include the File System module, use the require() method: var fs = require('fs'); Common use for the File System module: Read files Create files Update files Delete files Rename files Read Files The fs.readFile() method is used to read files on your computer. Assume we have the following HTML file (located in the same folder as Node.js): demofile1.html My Header Create a Node.js file that reads the HTML file, and return the content: Example var http = require('http');…
Read More
Node.js URL Module

Node.js URL Module

The Built-in URL Module The URL module splits up a web address into readable parts. To include the URL module, use the require() method: var url = require('url'); Parse an address with the url.parse() method, and it will return a URL object with each part of the address as properties: Example Split a web address into readable parts: var url = require('url'); var adr = 'http://localhost:8080/default.htm?year=2017&month=february'; var q = url.parse(adr, true); console.log(q.host); //returns 'localhost:8080' console.log(q.pathname); //returns '/default.htm' console.log(q.search); //returns '?year=2017&month=february' var qdata = q.query; //returns an object: { year: 2017, month: 'february' } console.log(qdata.month); //returns 'february' Run example » Node.js…
Read More
Node.js Email

Node.js Email

The Nodemailer Module The Nodemailer module makes it easy to send emails from your computer. The Nodemailer module can be downloaded and installed using npm: C:UsersYour Name>npm install nodemailer After you have downloaded the Nodemailer module, you can include the module in any application: var nodemailer = require('nodemailer'); Send an Email Now you are ready to send emails from your server. Use the username and password from your selected email provider to send an email. This tutorial will show you how to use your Gmail account to send an email: Example var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport({ service:…
Read More
MySQL Get Started

MySQL Get Started

  Node.js can be used in database applications. One of the most popular databases is MySQL. MySQL Database To be able to experiment with the code examples, you should have MySQL installed on your computer. You can download a free MySQL database at https://www.mysql.com/downloads/. Install MySQL Driver Once you have MySQL up and running on your computer, you can access it by using Node.js. To access a MySQL database with Node.js, you need a MySQL driver. This tutorial will use the "mysql" module, downloaded from NPM. To download and install the "mysql" module, open the Command Terminal and execute the…
Read More
MySQL Create Database

MySQL Create Database

Creating a Database To create a database in MySQL, use the "CREATE DATABASE" statement: Example Create a database named "mydb": var mysql = require('mysql');var con = mysql.createConnection({ host: "localhost", user: "yourusername", password: "yourpassword" }); con.connect(function(err) { if (err) throw err; console.log("Connected!"); con.query("CREATE DATABASE mydb", function (err, result) { if (err) throw err; console.log("Database created"); }); }); Run example » Save the code above in a file called "demo_create_db.js" and run the file: Run "demo_create_db.js" C:UsersYour Name>node demo_create_db.js Which will give you this result: Connected! Database created THU HUYỀN - LINKPIZ.COM
Read More
Node.js Intro

Node.js Intro

What is Node.js? Node.js is an open source server environment Node.js is free Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) Node.js uses JavaScript on the server Why Node.js? Node.js uses asynchronous programming! A common task for a web server can be to open a file on the server and return the content to the client. Here is how PHP or ASP handles a file request: Sends the task to the computer's file system. Waits while the file system opens and reads the file. Returns the content to the client. Ready to handle the next request.…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.