Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner (Part 1)

June 29, 2019

Well today I am gonna share with you guys how to Create Simple API with Node js, Express and Mongodb For Beginner. 

Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner

I make this tutorial for beginner so they will be able to create Simple API with Node js, Express and Mongodb in a very simple way. But first, lets read a summary introduction about Nodejs.

Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner (Part 1)
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner (Part 1)


Node js introduction | Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner

Node.js is a software that is designed to develop web-based applications. Node.js is written in the JavaScript programming language syntax. If we know JavaScript as a programming language that runs only on the client / browser side only (user interface), Node.js is created to complete the role of JavaScript so that it can also act as a programming language that runs on the server side, like PHP, Ruby, Perl, etc.

Node.js can run on Windows, Mac OS X and Linux operating systems without having to change the program code. Node.js has its own HTTP server library, making it possible to run web servers without using web server programs such as Apache or Nginx. Whoa, amazing!

In order to execute Javascript as a server language, an engine that is fast and has good performance is required. Therefore, V8, The Javascript engine from Google is used by Node.js which is also an engine used by the Google Chrome browser.

How does it Work ? | Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner

Unlike server-side programming languages ​​that are generally blocking, Node.js is non-blocking, just like how JavaScript works. Node.js runs on a base event (event-driven). The purpose of Blocking is simply, that a program code will run until it is finished, then switch to the next program code.

For example, we have a program with the following algorithm:
1. Receive requests for the blog page
2. retrieve blog data from the database
3. write html containing blog data
4. send response to client

If we use a blocking programming language that is multi-threaded, at the second point when the program retrieves data from the database for a certain period of time on one thread, then another thread prepared to run the third point (i.e. writing data from the database into HTML) is not will run until the thread for the second point returns data. This is actually not a problem because the CPU runs the process very quickly. It's just that Node.js with single-threaded does it differently.

Node.js, instead of allocating threads for each point, it will only create threads only if there is an event that requires it. For example in the algorithm above, when a program fetches data from a database, the program will only create a thread or in other words start processing the third point only if the data from the database has been received, using a callback. In addition, if there is another process that does not depend on the data, then the process will be carried out without having to wait for data retrieval to be completed.

Ok, that's just a very simple intruduction before we start aour tutorial about Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner.


Source :

Table Content

title Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 1 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 2 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 3 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 4 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 5 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 6 Link
Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap Part 7 Link

Tag : Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner, Express, Mongodb and Bootstrap For Beginner, Creating Simple CRUD Using Node js, Express, Mongodb and Bootstrap For Beginner

Share this

Related Posts

Previous
Next Post »