A RESTful API containing Star Wars data!
Thanks to @phalt for his work on the original Swapi and to @juriy for his work on the current Swapi.dev.
Currently we support the following endpoints.
- All (
GET api/films
) - Single (
GET api/films/{id}
)
- All (
GET api/species/
) - Single (
GET api/species/{id}
)
- All (
GET api/vehicles/
) - Single (
GET api/vehicles/{id}
)
- All (
GET api/starships/
) - Single (
GET api/starships/{id}
)
- All (
GET api/planets/
) - Single (
GET api/planets/{id}
)
- All (
GET api/people/
) - Single (
GET api/people/{id}
)
Currently we have a portal that presents some information about the API.
This portal is powered by Svelte and its code can be found on the /portal
subdirectory!
Currently we're hosted over at Microsoft Azure, via a App Service Plan that pulls from our DockerHub.
If you have what it takes to run Docker on your machine simply pull the image from rodolphoalves/swapi-deno:latest, map a port to the image's 8000
por and ta-da!
The following snippet might be of help: docker run -p 8000:8000 rodolphoalves/swapi-deno:latest
You'll need two things to run this project:
- Deno (v1.0.0 or greater)
- NodeJS (v13.7.0 or greated)
To run the api (as of the latest version) run deno run --unstable --allow-read --allow-net --allow-run .\app.ts
.
This will:
- Spin up a rest API listening to port
:8000
- Serve files from the
portal/public
folder on the/
route
From within the portal
folder
To build the frontend run npm run build
. This will serve the required files to the public
folder.
To run a developer version, with Hot Reload, run npm run dev
. This will constantly serve files (as you modify components) on the public
folder.
Personal note: I'm usually using two terminals to run and debug this application. On one terminal I launch deno (the API itself) and on the other one I launch Svelte's Dev Server. Then I launch Firefox Developer edition and navigate to http://localhost:8000 and test it out.
- Films endpoints
- People endpoints
- Planets endpoints
- Species endpoints
- Vehicles endpoints
- Starships endpoints
- Proper CORS configuration
- Rogue One data
- Solo data
- Episode VII data
- Episode VIII data
- Episode IX data
- Open API schema generation
- Improve data types
- Docker Image
- SPA to display the data