Skip to content

kevindelon146/core10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Star Wars Information API

This API provides information about Star Wars universe by connecting to the Star Wars API (SWAPI). Built with Node.js and Express.

Setup

  1. Clone the repository:
    git clone <repository_url>
  2. Navigate to the project directory and install dependencies:
    cd <project_dir>
    npm install
  3. Run the server:
    npm start

Usage

The API has three endpoints:

  1. /api/starships/luke: Returns a list of the Starships related to Luke Skywalker.

    Usage:

    curl http://localhost:3000/api/starships/luke
  2. /api/species/episode1: Returns the classification of all species in the 1st episode.

    Usage:

    curl http://localhost:3000/api/species/episode1
  3. /api/planets/total_population: Returns the total population of all planets in the Galaxy.

    Usage:

    curl http://localhost:3000/api/planets/total_population

Testing

To run the tests:

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors