Skip to content

Jbuck7/Restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


API Server and Test Page

Dependencies

  • Express.js (install with npm install express)
  • CORS middleware (install with npm install cors)

Getting Started

  1. Install dependencies: npm install
  2. Start the server: node server.js
  3. Open testpage.html in a web browser (use a live server or HTML viewer)
  4. Click the buttons on the page to fetch and display the items

Description

This repository contains a simple API server using Express.js and a test page to demonstrate CORS requests. The server provides three endpoints:

  • /headshot (image)
  • /resume (PDF)
  • /text (plain text)

The test page (testpage.html) makes fetch requests to these endpoints and displays the responses.

Note

Make sure to install the dependencies and start the server before opening the test page.

About

Simple RESTful API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published