API Development Using NodeJS, ExpressJS and MySQL

In this tutorial guide, we will build a simple NodeJS API using ExpressJS and MySQL with basic CRUD (create, read, update, delete) operations. NodeJS is a JavaScript run-time environment used to execute JavaScript code outside browsers i.e on the servers. Visit our other blog post, to learn more about what is NodeJS? NodeJS along with ExpressJS (web framework for NodeJS) is a widely used combination to build RESTful API’s with a database query language like MySQL or MongoDB.

forward

What is NodeJS

This short guide describes briefly what is NodeJS. Following are some of the references to the definition and explanation of the question What is NodeJS. Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. https://nodejs.org/en/ Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a browser. https://en.wikipedia.org/wiki/Node.js Node.js is an open source server environment which runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) https://www.w3schools.com/nodejs/nodejs_intro.asp NodeJS is not programming language or frameworkNodeJS is a run-time environment to execute JavaScript codeNodeJS is asynchronous which means that it can handle multiple requests at the...
forward

Host Angular App and NodeJS App on Same Domain

In this tutorial, we will discuss the steps to host angular app (front-end) and NodeJS App (back-end API) on same domain. The idea is that we will have a folder named as ‘public’ in the root folder of the app which will have all files associated to the angular app.

forward

Get Started with Angular 8

Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile, and native desktop. https://angular.io/ Important Commands: npm install -g @angular/cling new hello-worldng build --prod (for generating production ready files)ng serve and the app is available at http://localhost:4200To create a component use the command ng g c courseTo create services use the command; ng g s service-nameng add @angular/material OR npm install --save @angular/material @angular/cdknpm install --save @angular/animationsnpm install --save hammerjsng add angular-bootstrap-md Core Angular Concepts: InterpolationProperty interpolationClass bindingStyle bindingEvent bindingTemplate reference variablesTwo way bindingStructural...
forward

7 Steps To Create Hello World App in NodeJS using ExpressJS Framework

Download and install node.jsCreate a folder and CD into that folder using using node.js command promptrun the command npm initTo install and use expressjs ( Fast, unopinionated, minimalist web framework for Node.js ), run the command npm install express --saveCreate a new file and name it server.js (code is attached at the end of this post). Add the code (Server.JS File Code), in this file.To run the node.js app, run the command node server.jsVisit http://localhost:3000/ to see the results Extra Packages: To automatically restart the server, install supervisor package (nodemon can also be used) by running the command npm install npm...
forward

How to Add Quill Editor in Angular Project

This post describes the steps to integrate Quill Editor in an angular project. Run the following commands in your angular project directory: npm install ngx-quill --save npm install quill --save Inside app.module.ts or any shared module import the QuillModule import { QuillModule } from 'ngx-quill'; Add the following in imports array: QuillModule, // inside app.module.ts or any shared module Add following in index.html <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.6/quill.snow.min.css"> Now add the following where you want to display editor: <quill-editor></quill-editor> <!--replace existing text areas with this tag and rest will be handled by this-->...
forward

How to add Like/Love reactions in angular

This blog post describes step by step process to add like/love reactions in angular project. Step 1: Create a component by using the command ng g c e.g ng g c postReactions Step 2: <button (click)="incrementLove()"> love it{{post.loveCount}} </button> I have added a button in the html file of the post reactions component Step 3: On the blog page, we have a list of blog posts and we want to add post reactions in each post, so we have added the selector for post reactions at the bottom of each post inside the loop <app-post-reactions [postType]='posts' [post]='post'><br> </app-post-reactions> Also, you...
forward

How to Display the Index in Reverse Order for *ngFor Angular

Let's say that we have data in array e.g tasks = ['task 5', 'task 4', 'task 3', 'task 2', 'task 1']. Now when we will use ngFor then it will display the data like this: *ngFor="let task of tasks; let i = index" Task #{{i}}: {{task}} Output: Task 0: task 5 Task 1: task 4 Task 2: task 3 Task 3: task 2 Task 4: task 1 But we want to reverse the order of only the index. In order to do that in ts file of the angular components, define a veriable named as totalTasks: number. Now make it...
forward