#30 Introduction to Express JS | Working with Express JS | A Complete NODE JS Course

procademy
28 Nov 202217:54

Summary

TLDRIn this introduction to Express.js, viewers learn about its role as a minimal and flexible web application framework for Node.js. The video emphasizes how Express simplifies the development process by reducing the amount of code required to build applications. It guides users through the installation of Express, creating a basic server, and handling routes for GET and POST requests. The session highlights the ease of sending responses, whether text, HTML, or JSON, showcasing the framework's efficiency in building robust web applications. Ultimately, this lesson serves as a foundational step for developers looking to leverage Express.js in their projects.

Takeaways

  • πŸ˜€ Express.js is a free and open-source web application framework for Node.js that simplifies application development.
  • πŸ˜€ It minimizes the amount of code developers need to write by providing built-in classes and functions.
  • πŸ˜€ Express is popular in Node.js application development and is considered a standard framework.
  • πŸ˜€ The framework offers robust features, including complex routing, middleware handling, and server-side rendering.
  • πŸ˜€ Developers can organize their applications using the MVC (Model-View-Controller) architecture with Express.
  • πŸ˜€ To start using Express, a package.json file must be generated using the command 'npm init'.
  • πŸ˜€ The Express package can be installed via npm with the command 'npm install express'.
  • πŸ˜€ The entry point for an Express application is usually defined in the package.json file, commonly as app.js.
  • πŸ˜€ Routes in Express are defined using HTTP methods (GET, POST, etc.) combined with the URL.
  • πŸ˜€ Responses can be sent in various formats, including plain text, HTML, and JSON, using appropriate methods like send() and json().

Q & A

  • What is Express.js?

    -Express.js is a free and open-source web application framework for Node.js that simplifies the development of web and mobile applications by allowing developers to write less and simpler code.

  • How does Express.js improve the coding experience compared to vanilla Node.js?

    -Express.js reduces the complexity of Node.js applications by providing built-in classes and functions, allowing developers to achieve complex functionalities with minimal lines of code.

  • What are some features provided by Express.js?

    -Express.js includes features such as complex routing, easier handling of requests and responses, middleware integration, server-side rendering, and more.

  • How do you create a new project in Express.js?

    -To create a new project in Express.js, you generate a package.json file using the command 'npm init', which sets up the project's metadata and dependencies.

  • What command is used to install Express.js?

    -You can install Express.js using the command 'npm install express'.

  • What is the significance of the 'app.js' file in an Express.js project?

    -'app.js' is designated as the entry point for the application, where all configurations and route definitions for Express.js will be kept.

  • How do you start an Express.js server?

    -To start an Express.js server, you call the 'listen' method on the Express application object, passing in the port number and a callback function to execute once the server is ready.

  • What is the difference between handling GET and POST requests in Express.js?

    -GET requests are handled using the 'get' method, while POST requests are managed using the 'post' method on the Express application object.

  • How do you send a JSON response in Express.js?

    -To send a JSON response in Express.js, you use the 'json' method on the response object, which sets the content type to 'application/json'.

  • Why is Express.js considered a standard in Node.js application development?

    -Express.js is widely used and recognized for its minimalism and flexibility, making it a standard choice among developers for building web applications with Node.js.

Outlines

00:00

πŸ˜€ Introduction to Express.js

In this section, we are introduced to Express.js, a free and open-source web application framework for Node.js. It is described as a minimal and flexible framework that simplifies Node.js application development by allowing developers to write complex functionalities with minimal code. Express.js is built entirely on Node.js, making it one of the most popular frameworks for application development. Key features include robust routing, middleware handling, and server-side rendering. The section emphasizes how Express.js streamlines the development process, enabling a faster and simpler approach to writing Node.js applications, while also supporting the MVC architecture for organizing code.

05:01

πŸ˜€ Setting Up Express.js

This part focuses on the practical steps to set up Express.js in a project. The process begins with creating a project folder and generating a `package.json` file using the command 'npm init'. Next, Express is installed using 'npm install express', which adds Express as a dependency and creates a 'node_modules' folder containing the framework's code and its own dependencies. The section then guides the user in creating an `app.js` file, importing the Express package, initializing the app, and starting the server on port 3000, demonstrating the foundational setup required for an Express application.

10:02

πŸ˜€ Handling Routes and Responses

In this segment, the tutorial explains how to handle routes in an Express application. It illustrates the use of the `get` method to respond to GET requests at the root URL by sending a simple text response. The section also highlights the ability to send HTML and JSON responses, detailing how to format the responses accordingly. For HTML responses, the text is wrapped in an H4 element, while for JSON, the content type is set to application/json. The tutorial emphasizes the distinction between handling GET and POST requests, introducing the `post` method for managing POST requests and indicating that separate routes must be defined for different HTTP methods.

15:04

πŸ˜€ Conclusion and Next Steps

The final part summarizes the key takeaways from the session, reiterating the advantages of using Express.js over vanilla Node.js. It underscores how Express reduces the amount of code developers need to write while providing essential features for web development. The section hints at future lessons where deeper exploration of Express.js will occur, including API creation, while inviting viewers to ask questions and thank them for their engagement.

Mindmap

Keywords

πŸ’‘Express.js

Express.js is a free and open-source web application framework for Node.js, designed to simplify the development of web and mobile applications. It is a minimal and flexible framework that allows developers to build complex applications with a significantly reduced amount of code compared to using core Node.js. In the video, Express.js is highlighted as a crucial tool for writing Node.js applications faster and easier, showcasing its ability to handle complex routing and middleware effectively.

πŸ’‘Node.js

Node.js is a runtime environment that allows JavaScript to be run on the server side, enabling developers to use JavaScript for both client and server-side programming. The video emphasizes that Express.js is built on top of Node.js, which means it inherits the capabilities of Node.js while providing additional functionalities that streamline the web development process. This foundation allows developers to leverage the non-blocking, event-driven architecture of Node.js for building efficient web applications.

πŸ’‘Middleware

Middleware in Express.js refers to functions that have access to the request and response objects and can modify them or end the request-response cycle. The video mentions middleware as a feature of Express.js that enhances the ability to handle requests, manage errors, and facilitate additional functionalities within the application. For instance, middleware can be used for logging requests, parsing request bodies, and authenticating users.

πŸ’‘Routing

Routing is the process of defining how an application responds to client requests for specific endpoints, which consist of a URL and an HTTP method (GET, POST, etc.). The video explains that Express.js simplifies routing by providing methods such as app.get() and app.post(), allowing developers to define routes for different types of requests easily. This ability to manage routing effectively is crucial for building dynamic and responsive web applications.

πŸ’‘HTTP Methods

HTTP methods are standardized requests used to interact with resources on the web, including GET, POST, PUT, and DELETE. The video outlines how Express.js utilizes these methods to differentiate between various actions that can be performed on the same endpoint. For example, while a GET request retrieves data from the server, a POST request typically sends data to be processed by the server.

πŸ’‘package.json

The package.json file is a configuration file for Node.js projects that contains metadata about the project, including its name, version, dependencies, and entry point. In the video, the creation of this file is demonstrated through the npm init command, which guides the developer in specifying essential project information. This file is critical for managing project dependencies and scripts, and it enables seamless integration with npm (Node Package Manager).

πŸ’‘npm (Node Package Manager)

npm is the default package manager for Node.js, allowing developers to install, manage, and share packages or modules in their projects. The video showcases npm commands such as npm init for creating a package.json file and npm install for adding dependencies like Express.js. npm facilitates the use of third-party libraries and tools, greatly enhancing productivity in Node.js development.

πŸ’‘app.js

app.js is the designated entry point for the Express.js application, where the main application logic and configurations are defined. The video details how the app.js file is created and populated with code to require the Express framework and set up the server. This file is central to organizing the application and is where routes and middleware are typically defined to handle incoming requests.

πŸ’‘Server Listening

Server listening refers to the state in which a server is actively waiting for incoming client requests on a specified port. The video illustrates this concept when discussing the app.listen() method, which sets the server to listen on a designated port (e.g., 3000). This is a fundamental aspect of web servers, as it allows them to process requests and send responses to clients.

πŸ’‘Response Object

The response object in Express.js is an instance that is used to send a response back to the client after processing a request. The video describes how to use the response object to send different types of responses, such as text and JSON, to the client. Understanding the response object is essential for effectively communicating the outcome of client requests and delivering data in various formats.

Highlights

Introduction to Express.js, a minimal and flexible web application framework for Node.js.

Express.js simplifies complex Node.js code, allowing for quicker development with fewer lines of code.

Emphasis on Express.js being built entirely on Node.js, making it a standard framework in the Node.js ecosystem.

Overview of Express's features including complex routing, middleware handling, and server-side rendering.

Express promotes organized application structure using MVC architecture.

Demonstration of generating a package.json file for a new Express project using npm.

Step-by-step guide on installing Express using npm, which updates package.json with a new dependencies field.

Creation of an app.js file as the main entry point for the Express application.

Explanation of how to import the Express package and create an Express application instance.

Introduction to creating a server with the listen method, specifying port number and callback function.

Demonstration of handling routes with Express, particularly GET requests to the root URL.

Usage of response methods such as send and json for sending responses back to the client.

Setting status codes before sending responses, showcasing the importance of HTTP status management.

Handling POST requests and defining a route for processing such requests in the Express application.

Conclusion emphasizing the efficiency of Express.js in reducing code complexity compared to vanilla Node.js.

Transcripts

play00:00

hello and welcome to another section of

play00:02

this complete node.js course in this

play00:04

section we will learn what is express.js

play00:06

and why do we use it

play00:08

express.js is a free and open source web

play00:11

application framework for node.js

play00:13

Express is a minimal and flexible

play00:15

node.js web application framework that

play00:18

provides a robust set of features for

play00:20

web and mobile application development

play00:22

in simple words we can say that Express

play00:25

helps us develop node.js application by

play00:27

writing minimum node.js code it

play00:30

simplifies complex node.js codes with

play00:32

simple one or two line of codes

play00:34

so Express is a node.js framework

play00:37

this means that express.js provides some

play00:40

built-in classes and functions which we

play00:42

can use while developing a web

play00:44

application and we can write complex

play00:46

functionalities with simple one or two

play00:48

line of code

play00:49

without Express if we try to write the

play00:51

same functionality with core node.js the

play00:54

number of line of code can be large and

play00:56

we as a developer will have to write

play00:58

some complex Logics to achieve the same

play01:00

thing but with express it can be done

play01:03

with few line of codes and the

play01:04

complexity of the code is taken away by

play01:06

Express as the functionality is already

play01:08

defined by this framework right

play01:11

so remember that Express is completely

play01:14

built on node shares that means behind

play01:17

the scenes Express is built 100 using

play01:19

node.js

play01:21

it is also one of the most popular

play01:22

node.js Frameworks there are few other

play01:25

Frameworks as well but Express has

play01:27

become kind of a standard in node.js

play01:29

application development

play01:31

Express contains a very robust and very

play01:33

useful set of features things like

play01:36

complex routing easier handling of

play01:38

request and responses adding middleware

play01:40

server side rendering and many more

play01:43

things are all included out of the box

play01:44

with Express

play01:46

Express allows us to write node.js

play01:48

application faster and also simpler by

play01:51

providing us developers a predefined

play01:53

method for almost every complex task in

play01:56

node.js

play01:57

and with Express we can also organize

play02:00

our application to MVC architecture

play02:02

which is very popular software

play02:03

architecture pattern that we will also

play02:05

explore a bit during this course

play02:08

so again Express is a node.js framework

play02:10

which help developers write node.js

play02:13

program in a simple and much faster way

play02:15

Express makes a developer's life with

play02:18

node.js very much easier

play02:20

so now that we know what is expressed

play02:22

and why should we use express instead of

play02:25

using vanilla node.js to write node.js

play02:27

code let's now go ahead and install

play02:30

express.js for our project let's go to

play02:33

vs code

play02:35

here I have created a brand new project

play02:37

so this is our project folder with this

play02:39

name node.js with Express

play02:41

now the first thing which I am going to

play02:43

do here is for this project I am going

play02:45

to generate a package.json file and to

play02:48

do that let's open Terminal let's go to

play02:52

this new terminal option and it is going

play02:54

to open a new terminal

play02:56

here to generate a package.json file for

play03:00

the project all we have to do is we have

play03:02

to type this npm command npm init if I

play03:06

press enter

play03:08

it is going to ask a bunch of questions

play03:10

so let me move this terminal a bit up so

play03:13

that it will be more readable so first

play03:15

of all it is asking for the package name

play03:17

now here you can provide a package name

play03:19

and that package name should be URL

play03:21

friendly the words in that package them

play03:24

should not be separated by spaces it

play03:26

should be separated by a hyphen like you

play03:28

can see in this example okay so I'm

play03:31

going to use this same default name for

play03:34

the package name for my project all

play03:36

right so here I will not provide any

play03:37

name so if I press enter it is going to

play03:39

use this default name

play03:41

and for the version also I will keep the

play03:43

version as 1.0.0 let's press enter

play03:45

description I don't want to give any

play03:47

description or let's say

play03:49

learning express.js with node.js

play03:54

let's press enter

play03:55

so here it is asking for the file name

play03:58

which is going to be the entry point for

play03:59

this project by default it is specifying

play04:02

this index.js so if you don't provide

play04:04

any name it is going to use this

play04:06

index.js as the entry point but here I

play04:09

want to call my file which is going to

play04:11

be the entry point for this project as

play04:13

app.js

play04:14

okay so I will provide that name let's

play04:16

press enter test command we don't have

play04:19

any git repository we don't have any

play04:21

keywords I don't want to provide any

play04:22

keywords author here I will put my name

play04:26

let's press enter license let's use the

play04:28

default one this ISC license let's press

play04:31

enter and now it is asking whether this

play04:35

content for the package.json file is

play04:37

okay or not so basically when I press

play04:40

enter here it is going to generate the

play04:41

package.json file and in that

play04:43

package.json file this is going to be

play04:45

the content so here vs code is

play04:47

confirming whether this content is okay

play04:51

for me or not for the package.json file

play04:53

so basically this content is okay for me

play04:55

so I will simply press enter and now you

play04:57

will notice that a file with this name

play04:58

package.json has been created here

play05:01

and in this package.json file we have

play05:04

all the configuration related data for

play05:06

this project for example the name of the

play05:08

project version of the project

play05:09

description what is going to be the

play05:11

entry point for the project who is the

play05:13

author what is the license this project

play05:15

is using and so on

play05:18

okay let me go ahead and let me clear

play05:20

the console by typing this CLS command

play05:22

which

play05:23

and the next thing which I want to do is

play05:24

I want to install Express for this

play05:27

project

play05:28

and to install Express we are going to

play05:30

use another npm command npm install

play05:34

so using this npm install command we can

play05:37

install a package from npm Repository

play05:40

here the package which we want to

play05:41

install is called as Express

play05:44

so I will specify that name and when I

play05:46

press enter it is going to install that

play05:48

package so the package is being

play05:49

installed

play05:52

and once this package is installed you

play05:54

will notice that in this package.json

play05:56

file a new field called dependencies

play05:58

have been added and in that field we

play06:01

have this Express listed

play06:03

so basically this Express is going to be

play06:05

a regular dependency for this project

play06:08

the code which we are going to write

play06:10

that depends on this Express package

play06:13

and with that a folder called node

play06:15

modules has also been created and in

play06:18

this folder you will see that we have a

play06:19

folder called Express and in this folder

play06:22

we have all the code all the files

play06:24

related to express.js framework

play06:27

now you will also ask what are these

play06:29

folders for well this Express GS

play06:31

framework it might have its own

play06:34

dependencies so in order for this

play06:36

express.js framework to work properly we

play06:39

also need to install those dependencies

play06:41

so behind the scenes when we installed

play06:43

express.js the dependencies for this

play06:46

express.js were also installed and these

play06:49

are those dependencies

play06:51

all right

play06:54

now the next thing which I'm going to do

play06:56

is I am going to create an app.js file

play06:59

so inside this project folder I am going

play07:02

to create a new file I will call it

play07:04

app.js

play07:08

and this file this app.js is going to be

play07:10

our entry point

play07:12

okay if you see in the package.json

play07:15

for the entry point for this main we

play07:16

have specified app.js so this app.js is

play07:19

going to be our entry point and in this

play07:21

app.js we are going to keep all the

play07:24

configuration related to express.js

play07:27

all right now let's go ahead and let's

play07:30

require the Express package or let's

play07:32

import Express package now keep in mind

play07:36

that this Express is a third party

play07:38

package so here we are going to import a

play07:40

third party package now we have already

play07:42

learned how to import a package for that

play07:44

we use this require function

play07:47

to this require function we need to pass

play07:49

the package name within single quotes So

play07:51

the package name here is Express

play07:54

now when we are requiring this Express

play07:57

package what this line of code will do

play07:59

is it is going to return IF function

play08:03

and we want to assign that function to a

play08:05

variable so here I'm going to create a

play08:08

variable and I will call it express

play08:12

and to this Express I want to assign the

play08:14

function which this Express package is

play08:16

going to return

play08:18

and once that function is assigned to

play08:20

this Express variable I want to call

play08:22

that function so to call that function

play08:24

on this Express variable

play08:26

we can use a set of parentheses so here

play08:28

we are calling the function which this

play08:31

line of code has returned and which is

play08:33

assigned to this Express variable

play08:35

and now when we are calling that

play08:37

function it is going to return an object

play08:39

so let's go ahead and let's store that

play08:41

object in a variable and let's call that

play08:43

object f

play08:44

so this F variable here is going to

play08:46

store an object and in that object we

play08:50

have a bunch of methods which we can use

play08:52

in our node.js application

play08:54

for example let's say we want to create

play08:57

a server

play08:58

to create a server on this app object we

play09:01

are going to have a method called listen

play09:05

so this listen method what it is going

play09:07

to do is it is going to create a server

play09:09

and then it will also listen to the

play09:12

requests on that server

play09:14

now to this listen method we need to

play09:16

provide some arguments the first

play09:18

argument which we need to provide here

play09:19

is the port number so let me go ahead

play09:22

and let me create another variable I

play09:24

will call it port and to this let's

play09:26

assign a port number let's say 3000

play09:30

and let's pass this port variable as the

play09:32

first argument to this listen method

play09:35

all right and the second argument which

play09:38

we need to pass here is a callback

play09:39

function

play09:41

for that I am using this Arrow function

play09:43

syntax

play09:44

now this callback function will be

play09:46

executed as soon as the server starts

play09:49

that means as soon as the server is

play09:51

ready to receive requests so inside this

play09:54

callback function let me go ahead and

play09:55

let me log a console message saying that

play09:58

server has started

play10:02

all right

play10:03

with this if I save the changes

play10:06

let me go ahead and clear the console

play10:08

first and let's now go ahead and let's

play10:10

run this app.js file for that we can use

play10:14

this command node space

play10:16

app.js if I press enter you will see

play10:19

that this message server has started has

play10:21

been logged here that means now we have

play10:24

started this node.js server

play10:27

okay and where it is listening it is

play10:29

listening to the Local Host and the port

play10:31

number is 3000.

play10:33

now what we want is we want to handle

play10:36

some routes so for example let's say

play10:38

whenever a user makes a request a get

play10:41

request to the root URL we want to send

play10:44

some response

play10:45

so in the previous section we learned

play10:48

how to handle routes

play10:49

but here since we are using express.js

play10:52

in express.js the routes are handled a

play10:54

bit differently keep in mind that a

play10:57

route consists of the URL plus the HTTP

play11:01

method

play11:02

let me put a comment here

play11:04

so route equals HTTP method plus URL for

play11:11

example let's say you are making a get

play11:14

request to the root URL so the route

play11:16

here is the HTTP method is get and the

play11:20

URL is the root URL

play11:22

now if you are making a post request to

play11:24

the root URL then the route will be the

play11:26

method is HTTP post and the URL is the

play11:29

root URL okay so a route consists of the

play11:32

HTTP method for example get post put

play11:35

delete Etc and the URL

play11:38

so let's say we want to define a route

play11:40

where we want to handle the root URL

play11:43

whenever a get request is made on that

play11:45

root URL

play11:46

so for that on this app on this app

play11:49

object we have another method called get

play11:51

so using this get method we can handle

play11:54

get requests on the URL

play11:57

the first argument of this get method is

play12:00

the URL here we want to handle root URL

play12:03

for that we can simply specify a slash

play12:06

like this

play12:07

now whenever a get request is made on

play12:11

this root URL we want to do something

play12:14

for that as the second argument to this

play12:16

get method we can pass a callback

play12:18

function and this callback function will

play12:21

be called whenever a get request will be

play12:23

made on this specified URL in this case

play12:26

on this root URL

play12:28

and this callback function is going to

play12:30

receive two important arguments the

play12:32

request object and the response object

play12:35

and now from within this callback

play12:37

function we can send some response

play12:39

whenever a get request is made on this

play12:41

root URL

play12:43

and to send a response on the response

play12:46

object which we are receiving as the

play12:47

argument here we have a method called

play12:49

send and using this send method we can

play12:53

send an HTML response or a text response

play12:56

for now let's simply send a text

play12:58

response so here let's say hello from

play13:01

Express server

play13:03

okay

play13:04

now before sending the response if you

play13:06

also want to set the status code

play13:09

on this response object we have another

play13:11

method called status

play13:14

okay now keep in mind that if you want

play13:16

to set the status you need to set it

play13:18

before sending the response okay here we

play13:21

are doing the method chaining so before

play13:23

the response is sent we want to set the

play13:26

status of the response here let's say

play13:27

the status is 200 all right so what is

play13:30

happening here

play13:31

whenever a get request will be made on

play13:33

this root URL this callback function is

play13:36

going to be executed and from within

play13:38

this callback function we are sending a

play13:40

response first we are setting its status

play13:42

code to 200 and then we are sending a

play13:45

response we are sending this text

play13:47

response

play13:49

let's verify this so here I will save

play13:51

the changes let's stop the server by

play13:53

pressing Ctrl C and let's restart the

play13:55

server

play13:56

let's go to the browser and here let's

play13:59

type the URL so here we have to specify

play14:01

the localhost which is

play14:04

127.0.0.1 and the port number here is

play14:07

3000 because that's the port number we

play14:09

have specified and here you will see

play14:11

this response hello from Express server

play14:14

this is the same response which we are

play14:16

sending when the user makes a get

play14:18

request on this URL on the root URL

play14:23

right we are sending this response Now

play14:26

using this send method we can also send

play14:28

HTML response so what I will do is I

play14:29

will wrap this text within H4 element

play14:33

okay let's save the changes again

play14:36

let's stop the server by pressing Ctrl C

play14:38

and let's restart the server and let's

play14:41

go back to the browser

play14:43

and now if I make a get request to this

play14:45

root URL now we should receive some HTML

play14:49

response so now you can see that this

play14:51

text is bolded

play14:53

all right now keep in mind that when we

play14:56

use send method to send a response the

play14:59

content type of the response is by

play15:01

default set as text HTML

play15:04

but let's say we want to send some Json

play15:06

response

play15:07

in that case we cannot use this send

play15:09

method because as I mentioned when we

play15:11

use send method the content type of the

play15:14

response is set as Text slash HTML but

play15:17

when we want to send a Json response in

play15:19

that case the content type should be

play15:20

application slash Json

play15:22

so to send the Json response instead of

play15:25

using send we need to use Json

play15:29

all right and here we need to send some

play15:31

Json response for that what I'm going to

play15:33

do is I'm going to use a set of curly

play15:35

braces there let's specify a property

play15:37

maybe message and let's say message is

play15:41

hello

play15:42

world and let's also specify another

play15:44

property maybe status and let's set it

play15:47

to maybe 200. so now we want to send a

play15:50

Json response so when we are using this

play15:53

Json method in that case the content

play15:55

type of the response will be set as

play15:57

application slash Json and the Json

play16:00

response will be sent let's see that

play16:02

let's save the changes here let's stop

play16:04

this server by pressing Ctrl C and let's

play16:07

restart the server

play16:08

let's go back to the browser and let's

play16:11

make a request to this root URL and now

play16:13

you will notice that here we are

play16:15

receiving a Json response

play16:18

let's go back to vs code

play16:21

now here we are making a get request to

play16:23

this root URL but what if we want to

play16:25

make a post request

play16:27

so if we make a post request to this

play16:29

root URL in that case this route will

play16:32

not be executed because this route will

play16:34

only get executed when we make a get

play16:37

request on the root URL

play16:39

so to handle post request we will need

play16:41

to Define another route

play16:43

for that

play16:44

on this app object we have another

play16:46

method called post so using this post

play16:49

method we can handle post requests here

play16:52

we want to handle post request on this

play16:54

root URL so there I will simply provide

play16:56

slash

play16:58

and then we can pass a callback function

play17:00

here and this callback function will be

play17:02

executed whenever a post request is made

play17:05

on this root URL

play17:07

and from within this callback function

play17:09

we can write some logic which we want to

play17:11

execute whenever a post request is made

play17:13

on this root URL

play17:16

okay so in this lecture we learned what

play17:18

is express.js and why should we use

play17:21

express.js instead of using vanilla

play17:23

node.js because when we use express.js

play17:26

it minimizes the number of lines of code

play17:28

which we write

play17:29

behind the scenes X Plus JS is already

play17:32

using node.js but with express.js we

play17:34

need to write a fewer lines of code

play17:37

all right so in this section we are

play17:38

going to learn all about express.js and

play17:41

we are also going to create some apis

play17:43

this is all from this lecture if you

play17:45

have any questions then feel free to ask

play17:47

it thank you for listening and have a

play17:49

great day

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Node.jsExpress.jsWeb DevelopmentFrameworksCoding BasicsSoftware ArchitectureAPIsJavaScriptDeveloper ToolsLearning Resources