Giter Site home page Giter Site logo

marklee22 / api.pokedextracker.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pokedextracker/api.pokedextracker.com

0.0 2.0 0.0 537 KB

API for pokedextracker.com

Home Page: https://api.pokedextracker.com

License: MIT License

Dockerfile 0.10% JavaScript 99.83% Shell 0.07%

api.pokedextracker.com's Introduction

api.pokedextracker.com

CircleCI Dependency Status

The API for pokedextracker.com. It's written in Node.js v5 using the following libraries/packages:

Install

This project is meant to be run with Node.js v6.14.2, so make sure you have it installed and active when running this application. This project also relies on the yarn.lock file to lock down dependency versions, so we recommend that you use yarn instead of npm to avoid "it works on my computer" bugs that are all too common with just a package.json. Assuming you have nodenv installed, you just need to install v6.14.2 and then install the dependencies:

$ nodenv install 6.14.2
$ cd api.pokedextracker.com
$ yarn

The .node-version file should automatically switch the version for you whenever you cd into the project directory.

Database

This project uses PostgreSQL as its database, so you'll need to have the role and database setup. Assuming you already have it installed (either through brew on OS X or apt-get on Ubuntu), you can just run the following:

$ psql postgres
postgres=# CREATE ROLE "pokedex_tracker_user" CREATEDB CREATEUSER LOGIN;
$ createdb -O pokedex_tracker_user pokedex_tracker
$ yarn db:migrate

Secrets

There are some secrets needed to run this repo locally, such as the Stripe API Key. Since no secrets are being checked in, you should copy .env.example to .env and populate it with all of the secrets listed there.

Data

This repo doesn't include a way to completely load up the DB with all of the actual Pokemon data. That's only been loaded into the staging and production databases. For testing purposes and to make sure everything is functioning as expected, having that data isn't entirely necessary. You should be relying on tests and factories instead of the database state.

Tests

This project uses Mocha as the test runner, Chai BDD as our assertion library, and Istanbul to track code coverage. To run the tests locally, all you need to do is run:

$ yarn test

It will output the results of the test, and a coverage summary. To see a line-by-line breakdown of coverage to see what you missed, you should open ./coverage/lcov-report/index.html.

Docker

Every merge into the master branch on GitHub triggers a new build for a Docker image. That image will overwrite the latest tag, and there will be an explicit tag with the first 7 characters of the commit hash. The server will be listening on port 8647 so if you run a container locally, make sure that traffic is forwarded to that port. For example:

$ docker run --rm --publish 8647:8647 --name pokedextracker-api pokedextracker/api.pokedextracker.com:latest

api.pokedextracker.com's People

Contributors

ashcoding avatar robinjoseph08 avatar

Watchers

 avatar  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.