All language subtitles for 034 Challenge 16 Solution_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

All right so here comes the answer.

Before you do anything I recommend reading through the docs and seeing how these parameters work.

And remember that we're using the colon and then we're going to give our parameter a name so that we

can tap into it later on using req.params. the name that we specified.

So now we can head into our app.js and you can create that route any way you wish.

I'm going to put it just before the end right down here

just before my app.listen. And I'm going to say app.get and then I'm going to specify /

posts/: and then here comes the name of my parameter which you can call anything you

wish as long as it makes sense to you

but I'll call it postName. And then I'll add my callback, my req and res and then inside my callback I

am going to tap into that parameter called postName.

So I want to console log it. So I'm going to log the req.params.postName. And it has

to be spelt exactly the same as you see here after the colon.

But there's no colons down here

remember that. This is all that you need in order to tap into a dynamic

URL right?

Because we're using this parameter to decide what it is that we should do inside our app.get.

So we can now say if they said I wanted you know the post that has a post name of testing then we will

send them over there

and if they wanted the post that had a name of ordinary I love pets then we will show them that page.

So this is the first step towards getting a dynamic website created.

And this is all down to using Node and Express, nothing else.

Now we can test this and if we head over to posts/ anything you want to write afterwards then

it will get logged down here in our console.

So this is the first step towards achieving our dynamic website and feel free to mess around with it,

try out different parameter names, try out multiple parameters as you can see where they've got

this one which is a single parameter and this one which is another parameter

and you can actually tap into both just by using req.params. the name of your parameter in your

URL.

So play around with that and once you're ready we'll head over to the next challenge.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.