A simple but useful express example showing how to create routes, not found pages, serve static files, render data in templates, post data with forms, upload images, and delete things with an XHR (or Fetch).
npm:
git clone git@github.com:cmda-be/course-17-18.git
cd course-17-18/examples/express-server
npm install
npm start
The following commits show how this example was created:
2e61f81
add express as a dependencyef27811
add initial code7cabdda
add list of moviesdbb5379
add links to detail pages5f0f1db
add array-find as a dependency3efb144
add detail pages224ef72
add not found pageb827519
add css29bebf4
add ejs as a dependency196ee3b
add templates2c0de1d
add form28ef6ee
add slug, body-parser as a dependencies25a8716
add support for adding moviesbd7a2ca
add support for removing moviesee7907b
add upload directoryd602bed
add multer as a dependencyc34cf8c
add support for adding images