Skip to content

BurlingtonCodeAcademy/unit-5-creating-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab: Creating a JSON file

We will be creating a JSON file to use in our next lab.

Learning

  • Express Server
  • JSON files

Achieving

  • A server that serves a JSON file that you created.

Creating the JSON

  • Create a new subfolder at the top level, called api.
  • Within api, create answers.json
  • This JSON should contain the following key-value pairs: name, quest, favorite color.
  • Think back to a previous project where you were provided a JSON and use that as a reference for syntax

Serving the JSON

In your server, use a GET method to serve your 'answers.json' file. If you have done this correctly, when you navigate to the server in the browser at the route of the GET, you will see your JSON.

Outcome

  • A server that serves a JSON file that you created.

Going Further

  • Add multiple values to each key, either as an array or an object. This would allow for multiple names, quests, and favorite colors.

About

In this lab, we will dive into the realms of Express Server and JSON files to create a simple yet foundational project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors