Node.js REST API - Power levels of popular Marvel characters
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
config
data
.gitignore
README.md
app.js
package.json
yarn.lock

README.md

Marvel Power Levels Api

Express + MongoDB + Marvel API

Getting Started

Import Mongo Database Collection

  • Import power levels data:
mongoimport --db marvel --collection powerlevels --type json --file data/powerlevels.json --jsonArray

Add Marvel API Public/Private Keys

Dependencies

  • Install required dependencies:
npm install yarn -g
yarn

Scripts

  • Have Mongo running: mongod
  • Run server (port 8080): npm start
  • Run tests: npm test

API

GET /characters?name={name}&limit={limit}

  • Returns marvel characters that start with {name} and {limit} number of results

GET /powerlevels

  • Returns marvel characters with power levels for intelligence, strength, speed, durability, energy projection, and fighting ability.