marvel-server-api is a tiny server with express.js and the npm package marvel-api that allow us to do easy queries to API of Marvel Developer
-
Download the source code:
git clone https://github.com/cristian-ramirez/marvel-server-api.gitcd marvel-server-api.git
-
Run
npm install. -
After that you need create account on Marvel Developer website.
- Once logged in, go to tab My Developer Account.
- Copy and paste the values of public key and private key into new file named
.envas APP_KEY_PUBLIC and APP_KEY_PRIVATE respectively.
-
Finally run
npm run server.
You can use the current implementation with Heroku demo app, the currents values availables for search are characters, comics, creators, events, series, stories, such as:
https://marvel-server-api.herokuapp.com/api/{path}
Find by id:
https://marvel-server-api.herokuapp.com/api/{path}/{id}
Also you can use query string to set limit of values by query and offset for pagination, for instance:
https://marvel-server-api.herokuapp.com/api/{path}?limit={number}&offset={number}