Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 791 Bytes

File metadata and controls

25 lines (19 loc) · 791 Bytes

GDG Js Crash Course week 4 - Http server with Express

This is a repo going over the steps taken during the fourth lessons of the London GDG group JS course.

Steps

  • setup

    • npm init and install express
    • setup basic listening server on server.js
    • install and setup nodemon for easy reload with npm start script
  • hello world

    • send a string as a response
    • inspect the cookie-cutter html file and remember the js script
    • send the file instead
  • serve multiple files

    • uncomment the script and css and check the error
    • create new route to serve js
    • copy/paste for css
    • use express static instead
  • form and post

    • create route for the newsletter.html page
    • handle request by saving it to file and sending a success message