Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
now another benefit of next.js is
serverless functions
remember when i call next.jsp fullstack
framework
this is why
you can essentially run your node.js
code in the same codebase as your
reaccode
and it all lives inside the pages
directory
now anything inside the api folder you
will automatically
route to it right it automatically a
route is created for that because of the
next year's file system based routing
right but also anything under the api
folder also has a node server configured
already and it all comes out of the box
what's really cool is that you can do
all of this without any configuration
and your front end can easily talk to
your backend that is the serverless
function so in an example here hello is
actually a serverless function
now what exactly is the advantage here
why do we want to make sure that we want
our front-end to talk to our back-end
well let's take a look
if you're trying to go ahead and call a
foursquare api or an airtable api
or any other api
that has specific secret credentials
that we don't want to share with anyone
right
you don't want to store those
credentials on your client because any
malicious user can go ahead and access
it but instead you want to store those
credentials on the server
that api key should be on the server
that you should be hiding from your end
users
and this is possible because of
serverless functions
the front end can easily talk to your
backend and backend will be the place
where you will call these specific apis
but if you're wondering wait hold on a
second now that we know all the
capabilities of serverless function what
exactly are they
what does what do we mean by serverless
functions
well let's take a look at the diagram
here
as we make a request to a serverless
function called as hello essentially
what's going to happen is
it is going to go ahead and spin up a
new server just to make sure that it
fulfills that specific request and after
no activity it is going to go ahead and
shut down
so
the minute we call slash api hello it is
going to wake up the server start a
brand new node server it is going to
execute the code inside the hello api
and then go ahead and
execute it successfully
and then shut down the server
so this is why it is called a serverless
function you only need the server to
perform that specific task and if there
is no activity it is going to go ahead
and shut it down
so this is the power of serverless
functions
and all of this is already configured in
xjs you don't need to do any additional
setup for it all we need to do is go
ahead and create a new file under the
api folder
serverless functions are really powerful
because you don't need to keep your
server running all the time
and to learn more about serverless
functions because there is a lot you
have to check out the course and learn
more about the serverless functions
there we will be using serverless
functions throughout this course and
diving into all the nitty-gritty details
about serverless functions and i'm
really excited for that because they are
definitely my favorite
so this is why next yes is known as the
react framework for production because
in order to make a production ready site
you need to have all the necessary
powerful tools to be able to do that
and we won't just have any side we would
have the best performance site out there
and thanks to nexjs as we are able to go
ahead and build front end as well as
back end of your app in the same code
base
and also we get seo we get performance
and we also get a lot of
things that makes the life of developers
so much easier
all right so now that we have learned
about serverless functions
let's take a look at why nextgs is
popular
and if we have any doubts yet because
we now know why it is popular right so
let's take a look
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.