Skip to content

A serverless API written in Typescript that scrapes mobafire.com for abilities and returns a formatted JSON

Notifications You must be signed in to change notification settings

dportuesi/league-ability-quiz-api

Repository files navigation

league-ability-quiz-api

This api provides enpoints that Scrape Mobafire.com for abilities and returns them in a nice formatted JSON.

Frontend for the league-ability-quiz available here: https://github.com/smicklas/LeagueAbilityQuiz

Based off of servreless-starter: https://github.com/AnomalyInnovations/serverless-typescript-starter

Requirements

Usage

To simulate API Gateway locally using serverless-offline

$ serverless offline start

or

$ npm run start-offline

Deploy your project

$ serverless deploy

Running Tests

Run your tests using

$ npm test

We use Jest to run our tests. You can read more about setting up your tests here.

Environment Variables

To add environment variables to your project

  1. Rename env.example to .env.
  2. Add environment variables for your local stage to .env.
  3. Uncomment environment: block in the serverless.yml and reference the environment variable as ${env:MY_ENV_VAR}. Where MY_ENV_VAR is added to your .env file.
  4. Make sure to not commit your .env.

Linting

We use ESLint to lint your code via serverless-bundle.

You can turn this off by adding the following to your serverless.yml.

custom:
  bundle:
    linting: false

To override the default config, add a .eslintrc.json file. To ignore ESLint for specific files, add it to a .eslintignore file.

About

A serverless API written in Typescript that scrapes mobafire.com for abilities and returns a formatted JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published