Setting Up Your Environment

Contributions Welcome

One of the main goals of this project is to make getting work done, as easy as possible for developers. That's why we chose create-react-app as our react boilerplate. create-react-app really makes it easy to not have to worry about all the others things that generally go into react development (babel, webpack, etc.), and allow developers to focus on development.

If you've already read the Contributing Guide then you've probably read most of this already, but here's how you set up your environment for this project.

Set Up

You will need to have the following installed on your machine before continuing:

Next, you'll want to cd into the project's root and install our node dependencies:

cd iwanttocontribute
yarn install

Note: This app is now officially using Yarn for it's package manager. Make sure you check out the installation information above.

Configuring Your Github Token

The last requirement is that you have a Github access token created. This is required because the Github API allows us a much larger rate limit when accessing their API with an authenticated access token. To create your access token, follow the Creating a Token part of this guide. Give it whatever descriptive name you want, and as far as permissions go, don't give it any additional permissions (ie. don't check the checkboxes). There's no need. This token only needs public access level.

From here, the token (a long string of characters) should be displayed to you. Copy the token, create a file named .env in this project's root and add this line to it:

GITHUB_TOKEN=<Your Github Token>

(make sure you replace <Your Github Token> with the token you copied). Save that file, and make sure you DON'T commit it to git! This is your personal secret Github token.

Voila! Your dev environment is all set up! You can now run yarn start to spin up your development server, which will redirect you to the app in your browser.

Note: For more information about the dev environment for this project, along with some other related topics, check out the Developer Guide in the docs.

Vagrant Environment

Using the default ubuntu/trusty64 should work fine. You will need to forward a port to access the app from your local machine. This will allow you to access the processes running on specific ports within your vagrant machine to be accessed on a port on your host machine. Add this line to your Vagrantfile to map your vagrant ports [3000 & 5000] to ports 3000 & 5000 on your host machine:

config.vm.network "forwarded_port", guest: 3000, host: 3000
config.vm.network "forwarded_port", guest: 5000, host: 5000

You should now be able to access your app now at http://localhost:3000

Running the App

To run the app, run:

yarn start

This will successfully start your UI server and your express server as well. After running this command, go to http://localhost:3000 to view the app.

There is a little bit of magic that goes into yarn start. Although it's not anything crazy, it can be hard for newbies to understand. For more information about what the yarn start command does, view the doc:

Yarn Start

Next Up: Yarn Start

results matching ""

    No results matching ""