Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 1.67 KB

CONTRIBUTING.md

File metadata and controls

76 lines (48 loc) · 1.67 KB

Contributing

Thank you for considering contributing to Package Phobia!

The goal of this project can be found in the README.md so this document will focus on building, running, and testing the code.

Getting Started

First, clone this repository.

git clone https://github.com/styfle/packagephobia
cd packagephobia

Redis

You will need to run redis either locally or in the cloud such as redis labs.

If you have docker, you can get started quickly with the following command.

docker run -p 6379:6379 redis

Env

Create a .env file in the root directory.

# required settings
REDIS_HOST="localhost"
REDIS_PORT="6379"
REDIS_PASS="SomePass42"
GA_ID=""

# optional settings
export PORT="3000"
export NPM_REGISTRY_URL="https://registry.npmjs.com"

Running the code

Make sure you have the ZEIT Now cli installed with npm install -g now.

now dev

Now the web app should be available at http://localhost:3000

Testing the code

Make sure the tests are passing.

npm test

Deploying the code

The code is deployed to ZEIT Now via GitHub Integration.

If you want to deploy from the command line, you'll need the now cli. Run npm install -g now to get it.

Then you can simply run now and the code will deploy.

Submitting a PR

Wow you're doing great! Before you submit a Pull Request, please create an issue so that we can discuss the problem you are solving. When we're all on the same page, make sure you test the code and prettify the code. And please add additional tests if possible.

npm run test
npm run prettier