Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielsogl/marvel-api-wrapper
A simple to use Marvel API wrapper powered by Express.js and TypeScript
https://github.com/danielsogl/marvel-api-wrapper
api-wrapper express heroku marvel-api nodejs typescript
Last synced: about 1 month ago
JSON representation
A simple to use Marvel API wrapper powered by Express.js and TypeScript
- Host: GitHub
- URL: https://github.com/danielsogl/marvel-api-wrapper
- Owner: danielsogl
- License: mit
- Created: 2018-04-24T11:27:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:57:31.000Z (11 months ago)
- Last Synced: 2024-04-13T17:08:38.848Z (7 months ago)
- Topics: api-wrapper, express, heroku, marvel-api, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 183 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Marvel API Wrapper
[![Build Status](https://travis-ci.org/danielsogl/marvel-api-wrapper.svg?branch=master)](https://travis-ci.org/danielsogl/marvel-api-wrapper)
A simple to use Marvel API wrapper powered by [Express.js](http://expressjs.com/de/) and [TypeScript](https://www.typescriptlang.org)
![Marvel logo](https://upload.wikimedia.org/wikipedia/commons/0/04/MarvelLogo.svg 'Marvel API Wrapper')
## About
This repository allows you to use the official [Marvel API](https://developer.marvel.com) with some awesome features.
* Caching
* Simple configuration
* Only requests without another Marvel API libraryAnd the best feature is you only need to call the API wrapper like you would call the official API. So you don't need to read two documentations.
```http
http://localhost:8080/characters
http://localhost:8080/comics
...
```You can also add the documented URL parameters like this:
```http
http://localhost:8080/characters?nameStartsWith=S&orderBy=-name&limit=50&offset=10
```## Setup
1. Go to the official [Marvel developers](https://developer.marvel.com) website and create a new account. After that, you will find a private and a public key inside your developer's profile page.
2. Generate a new `.env` file inside the root path of this repository and place them like this:
```text
PUBLIC_KEY=12345
PRIVATE_KEY=12345
```3. Start the server by running the `npm run watch` command.
## Build
Because this repository is built in TypeScript you have to compile the `*.ts` files to plain JavaScript.
Run `npm run build` and the compiled `*.js` files are placed inside the `dist` folder.## Deploy
I recommend using [Heroku](https://www.heroku.com) to deploy this repository because of nearly zero configuration and zero costs. Heroku also gives you the ability to use Redis as in-memory-database. The repository is already configured to run out of the box on Heroku.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/danielsogl/marvel-api-wrapper)
## Test
I added basic unit tests to this repository. You find them inside the `./tests` folder. Feel free to add your own.
To run the tests just run `npm run tests`.