GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - profiq/swapi-elixir: The Star Wars API, reimplemented in Elixir. Example API for your projects.

BranchesTags
Open more actions menu

Latest commit

 

History

191 Commits
191 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
config
config
 
 
dev
dev
 
 
lib
lib
 
 
priv
priv
 
 
rel
rel
 
 
test
test
 
 
.dockerignore
.dockerignore
 
 
.formatter.exs
.formatter.exs
 
 
.gitignore
.gitignore
 
 
.tool-versions
.tool-versions
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
fly-dev.toml
fly-dev.toml
 
 
fly.toml
fly.toml
 
 
logo.psd
logo.psd
 
 
mix.exs
mix.exs
 
 
mix.lock
mix.lock
 
 

Repository files navigation

Elixir SWAPI

Build status Prod is hosted at swapi.profiq.com Dev is hosted at swapi-dev.profiq.com

The Star Wars API (SWAPI), reimplemented in Elixir.

This project aims to be almost fully compatible with the original API (https://swapi.dev/), including pagination and search query parameters.

Development

Local environment

Prerequisites

The following software is required for local development:

  • Elixir 1.15
  • Erlang/OTP 26
  • NodeJS 18+

Instructions

To start the server locally, follow these steps:

  • Run yarn inside folder assets to install JavaScript dependencies
  • Run mix setup to install and setup dependencies
  • Start the API endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Docker

The server can also be started under Docker by running docker compose -f dev/docker-compose.yml up. When started, the API will be accessible under the same port as when running locally (localhost:4000).

Common tasks

Updating the Postman collection

The Postman collection is stored in priv/static/downloads/swapi.postman_collection.json. Whenever the API documentation changes, the collection should be updated to match.

You can generate a new collection file as follows:

  1. Start the server.
  2. Click "Import" in the workspace sidebar in Postman, enter the URL to the OpenAPI doc, e.g. http://localhost:4000/api/openapi and import the API as a Postman collection.
  3. Open the "Elixir SWAPI" collection, go to the Variables tab in the main pane and change the baseUrl variable to https://swapi.profiq.com.
  4. Right-click the "Elixir SWAPI" collection, click "Export" and choose the Collection 2.1 format.
  5. Copy the exported collection to priv/static/downloads/swapi.postman_collection.json.

About

The Star Wars API, reimplemented in Elixir. Example API for your projects.

swapi.profiq.com

Topics

apielixiropenapistar-wars-apiswapitutorial-api

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

2 stars

Watchers

3 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.