Skip to content

pokedextracker/pokedextracker.com

Repository files navigation

pokedextracker.com

CircleCI Dependency Status

A website to track your completion of a Living Pokedex.

Install

This project has been tested to work with Node.js v5 (at least v5.10) and v6 (though it might work for other versions), so make sure you have one of them 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.

Unix

When on Linux or Mac OS X, we recommend using nvm so that you can easily switch between Node versions. This is so that they don't conflict with each other when working on different Node projects.

$ nvm install 5
$ nvm use 5
$ yarn

If you have avn or nodenv setup, the .node-version file should automatically switch the version for you.

Keep in mind though that nvm is not required to run this application.

Windows

While there is nvm for Windows, we've seen some people having issues with later versions of Node. So instead, it might just be easier to install Node using the Windows Installer. Once you have Node installed, then you should be able to just install the dependencies.

> yarn

Running

To run the development server to test it locally, you only need to run:

$ yarn start

Once the bundle becomes valid, you should be able to go to http://localhost:8080 to view it.

Linting

To ensure your files are following the preferred style guide, you can run:

$ yarn run lint

This is run on Travis whenever a commit is made so if you're going to contribute, you should make sure your files pass the linter.

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 4939 so if you run a container locally, make sure that traffic is forwarded to that port. For example:

$ docker run --rm --publish 3000:4939 --name pokedextracker pokedextracker/pokedextracker.com:latest

Deployments

Note: you need the necessary permissions to be able to deploy.

The deploy script uses Helm and the web-app Helm chart to create a new release in the PokedexTracker Kubernetes cluster. Pass in the newly created Docker tag to deploy that version to the cluster.

$ yarn deploy:staging 123abcd
$ yarn deploy:production 123abcd