Skip to content

basisdatalab/study-group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Task Week 4

Bab: HTTP Request and Basic Routing with ExpressJS

Deadline: Selasa, 19 September 2017 pk 19.19

  1. Pahami perbedaan request GET dan POST

ref: https://www.w3schools.com/tags/ref_httpmethods.asp

  1. Pahami Route paths

ref: http://expressjs.com/en/starter/basic-routing.html

  1. Pahami Route parameters

req.params: http://expressjs.com/en/4x/api.html#req.params

req.query: http://expressjs.com/en/4x/api.html#req.query

  1. Buat 5 routes yang berbeda, dengan spesifikasi:

    1. Route biasa
    2. Route biasa with spesific route
    3. Routing using req.params
    4. Routing using req.query

    Contoh

    • Baris pertama: Get request url nya
    • Baris kedua: Hasil print di browsernya
  1. /route_biasa
 Hello world!
  1. /ini_juga_route_biasa
Hello kalian!
  1. /route_kedua/ini_spesific_route
Ini juga Hello world!
  1. a. /route_ketiga/foo bar
Heelllooo! foo bar
  1. b. /route_ketiga/paijooke
Heellooo! paijooke
  1. /route_keempat/user?nama=Basisdata Laboratory
Welcome to route empat, Basisdata Laboratory

About

Database Laboratory Projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published