nhedeker / pokemon_templating

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pokemon Templating

Part 1

Using a provided data set, implement an Express server that renders content using a templating engine.

  1. Fork and clone this repository
  2. cd into the pokemon_templating directory
  3. Run npm install
  4. Start the server with nodemon server.js
  5. Visit localhost:8000/pokemon to see a table of all Pokemon
  6. Visit localhost:8000/pokemon/:id to see an individual Pokemon

Resources

Part 2

Successfully load the files needed to use Materialize to style template content.

  1. Read this short article: Serving static files in Express.
  2. Use the path module to normalize the path to the public directory.
  3. In the server.js file, write a middleware function to serve static files.
  4. Duplicate your existing template files to make two new files titled index2.ejs and profile2.ejs.
  5. Write the <meta>, <link>, and <script> tags needed to load the static files for Materialize.
  6. Restyle how the content is rendered using Materialize components.

HINT: The public directory already includes the static files needed for Materialize and a styles.css file to define custom styles if wanted.

Resources

About


Languages

Language:JavaScript 65.5%Language:CSS 33.6%Language:HTML 0.9%