Skip to content

Learn-by-doing/bitstarter

Repository files navigation

bitstarter

A crowd funding website that uses Bitcoin.

Build Status Status of Dependencies

Requirements

You will first need to have the following dependencies installed before you can work on this project:

You need to get both Node and git working before moving on with the rest of the instructions. Both have pretty straight forward setup guides so getting them working shouldn't be a problem.

Database Setup

Once you have MySQL installed, you will need to setup the local database. Run the following SQL queries to create the database and user:

CREATE DATABASE IF NOT EXISTS bitstarter;
CREATE DATABASE IF NOT EXISTS bitstarter_test;

GRANT USAGE ON * . * TO  'bitstarter'@'localhost' IDENTIFIED BY  'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT USAGE ON * . * TO  'bitstarter_test'@'localhost' IDENTIFIED BY  'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

GRANT ALL PRIVILEGES ON  `bitstarter` . * TO  'bitstarter'@'localhost';
GRANT ALL PRIVILEGES ON  `bitstarter_test` . * TO  'bitstarter_test'@'localhost';

Install Node Modules

Before you can run the server application, you will need to install the node module dependencies for the project. From inside the project directory, run the following command:

npm install

This will install the dependencies listed in the project's package.json file.

Start the Application

Now that you have all the dependencies required, you can run the app:

npm start

If everything is OK, then you should see the following:

Example app listening on port 3000!

Creating Test Users

A node script is used to create test users. Run the script from your project directory like this:

node ./scripts/create-user.js

Follow the instructions to create a new user.

Once you've created a test user, you should now be able to login with its username and password. Open your browser and go to http://localhost:3000/login to login to the test user account.

How Do I Contribute?

Terminology:

  • pull request - a request to include changes in a project
  • fork - a copy of a project (all files and history)

To contribute to the project, you will use pull requests instead of pushing your changes directly. The first thing you must do is create a fork of this project. This will create a full copy of the project in your GitHub account. You have full read/write privileges to your fork.

Now that you have your fork, you must clone it locally. Run the following command:

git clone https://github.com/YOUR_USERNAME/bitstarter.git

Be sure to replace YOUR_USERNAME with your GitHub username.

Make your changes to the project locally. Save your changes by committing them:

git commit -a -m "Some message goes here"

Push the changes to your fork:

git push origin master

Go to your fork on GitHub and click the green "Create a pull request" button. At the next screen, scroll down to view the changes you've made. Click the "Create pull request" to submit the changes as a pull request.

How to Keep Your Local Project Up-to-date

Overtime, the project will change. To keep your local copy of the project up-to-date, you will need to download the changes from Github and merge them into your local instance of the project.

If you have not done so already, you will need to add the upstream remote to your local git repository:

git remote add upstream https://github.com/Learn-by-doing/bitstarter.git

To download the latest changes from upstream (this does not make any changes to your files):

git fetch upstream

upstream is the name of the main project's remote

Now to merge the latest changes into your local master branch:

git checkout master
git merge upstream/master

And finally, update your fork:

git push origin master

That's it! Your local and your fork (in GitHub) should now both be up-to-date.

About

A crowd funding website that uses bitcoin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published