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
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
Persian
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
All right.
So time for challenge 16. Make sure that you've watched a class lesson on Express routing parameters because
this challenge is all about putting it into practice. To start off this challenge
I want you to head over to your console and you're going to type the letters 'rs' while your nodemon
server is running.
What this does is that it will force nodemon to restart your server.
And in terms of our website that means it will get rid of any previous blog post that we had because
it will rerun this entire page and it will set our posts array back to empty.
So the challenge is can you change the code inside Atom such that we head over to localhost:3000
/posts/ anything you type in here, let's say testing right.?
Then when I hit enter it should do nothing on our page but when you head over to our terminal it should
print whatever it is that comes after
/post/ right?
So this last part, whatever it is I write in here, when I hit enter it should get logged in our console.
And this requires you to apply what you learned in the last lesson about route parameters and using
Express JS to achieve this.
So pause the video and complete the challenge
now. All right so there's only one hint for this challenge and that is remember that using Express if
you have a read of the documentation, you can see that whatever parameter you have in here you can access
it using request.params and then dot the name that you've put over here
right? So whatever it is, it has to be spelt exactly the same. And hopefully this is enough of a hint for
you to be able to reach the answer yourself.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.