###WDI Darth Vader
We're going to continue building a few basic servers using Node.js. We want to demonstrate that we can serve HTML and JSON using Node anf the http
module.
- Create a new directory and call it
node_people
- Change into that directory.
- Run
npm init
to create yourpackage.json
- In your
index.js
, create a server that returns JSON. - The JSON you should return will have the following string attributes:
- Name
- Hobby
- Colour
- FavouriteBook
- Create a new directory and call it
node_about
- Change into that directory.
- Run
npm init
to create yourpackage.json
- In your
index.js
, create a server that returns a basic HTML page about yourself. - The HTML should return with the following tags:
- html
- body
- h1
- h2
- p
- Create a new directory and call it
node_turtles
- Change into that directory.
- Run
npm init
to create yourpackage.json
- In your
index.js
, create a server that returns JSON about a Teenage Mutant Ninja Turtle. - The JSON you should return will have the following attributes:
- Name
- Weapon
- Colour
- FavouriteFood
- Age