GithubHelp home page GithubHelp logo

manojtrek / deno-swapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodolphocastro/deno-swapi

0.0 1.0 0.0 194 KB

A StarWars API written with Deno and powered by Oak and Svelte!

License: GNU General Public License v3.0

TypeScript 61.96% CSS 0.20% HTML 3.58% JavaScript 10.31% Dockerfile 3.09% Svelte 20.86%

deno-swapi's Introduction

๐Ÿš€ SWApi Deno

A RESTful API containing Star Wars data!

๐Ÿ† Acknowledgements

Thanks to @phalt for his work on the original Swapi and to @juriy for his work on the current Swapi.dev.

๐Ÿ’ป Endpoints

Currently we support the following endpoints.

๐ŸŽฅ Films / Movies

  • All (GET api/films)
  • Single (GET api/films/{id})

๐Ÿงฌ Species

  • All (GET api/species/)
  • Single (GET api/species/{id})

๐Ÿš— Vehicles

  • All (GET api/vehicles/)
  • Single (GET api/vehicles/{id})

๐Ÿš€ Starships

  • All (GET api/starships/)
  • Single (GET api/starships/{id})

๐ŸŒ Planets

  • All (GET api/planets/)
  • Single (GET api/planets/{id})

๐Ÿคผ People

  • All (GET api/people/)
  • Single (GET api/people/{id})

๐ŸŒŒ Portal

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!

โฏ Running

โ˜ Using in the Cloud

Currently we're hosted over at Microsoft Azure, via a App Service Plan that pulls from our DockerHub.

๐Ÿ‹ Using Docker

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

Requirements

You'll need two things to run this project:

  • Deno (v1.0.0 or greater)
  • NodeJS (v13.7.0 or greated)

Backend

To run the api (as of the latest version) run deno run --unstable --allow-read --allow-net --allow-run .\app.ts.

This will:

  1. Spin up a rest API listening to port :8000
  2. Serve files from the portal/public folder on the / route

Frontend

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.

๐Ÿ“ Roadmap

  • 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

deno-swapi's People

Contributors

dependabot[bot] avatar rodolphocastro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.