Code Monkey home page Code Monkey logo

pokemoncoreapi's Introduction

DotNet Core Pokemon API

A Pokemon List API

Getting Started

This is DotNet Web API example that get its pokemon data from a remote API and caches it using Redis in order to deliver a full working solution of distributed application using dotnet core 2.0.

Prerequisites

You're going to need Redis, I'm using an Docker image myself and you can get one by running:

docker run -d --name myRedis -p 6379:6379 redis

Installing

You can get your development env running by following these steps:

Get the code

git clone [email protected]:davidsellen/pokemoncoreapi.git

Restore dotnet packages

dotnet restore

Run the Application

dotnet run

Navigate to http://localhost:5000/api/pokemon to get a list of pokemons

Navigate to http://localhost:5000/api/pokemon/1 to get a single pokemon

Deployment

using docker follow these steps:

docker-compose build
docker-compose up

now browse to http://localhost:8080/api/pokemon/ and see the JSON output of:

[{"id":1,"name":"bulbasaur"},{"id":2,"name":"ivysaur"},{"id":3,"name":"venusaur"},{"id":4,"name":"charmander"},{"id":5,"name":"charmeleon"},{"id":6,"name":"charizard"},{"id":7,"name":"squirtle"},{"id":8,"name":"wartortle"},{"id":9,"name":"blastoise"},{"id":10,"name":"caterpie"},{"id":11,"name":"metapod"},{"id":12,"name":"butterfree"},{"id":13,"name":"weedle"},{"id":14,"name":"kakuna"},{"id":15,"name":"beedrill"},{"id":16,"name":"pidgey"},{"id":17,"name":"pidgeotto"},{"id":18,"name":"pidgeot"},{"id":19,"name":"rattata"},{"id":20,"name":"raticate"}]

Built With

  • Redis - For distributed caching
  • DotNetCore - Web server
  • Docker - Ship web server and caching server as containers

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

pokemoncoreapi's People

Contributors

davidsellen avatar raromano avatar

Watchers

James Cloos 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.