/firebase-contract

A smart contract using firebase

Primary LanguageJavaScript

!!! README.md created by KudohAtsuo https://github.com/KudohAtsuo/kickstart !!!

kickstart project ==NEXT react dApp==

This app is a basic crowd-funding dApp using Ethereum. Same as crowd funding in the real world, you can create campaigns requiring minimum contribution. The creator can propose how to use money and how much money is needed as a 'Request'. He cannot use money without more than 50% approvers in voting.

How to start

npm install to install dependency modules.

npm run devto start on localhost:3000

You need some fake ETH on Rinkeby. Please get MetaMask!

on public server: https://crowdcoin10.herokuapp.com/

=====Heroku deployment steps=======

I used via Github deployment method to deploy. Below is my steps on heroku:

  1. Creating .gitignore
node_modules/
.next/
*.log
ethereum/compile.js
ethereum/deploy.js
/test
ADDRESS
  1. Configuration on package.json
    "scripts": {
      "dev": "node server.js",
      "build": "next build",
      "start": "NODE_ENV=production node server.js",
      "heroku-postbuild": "next build"
    },
  1. Creating Procfile

web: npm start --port $PORT

  1. Making github repo & push

add ., commit, remote add, push

  1. From my terminal

heroku create <my-app-name>

  1. From my terminal

heroku config:set NPM_CONFIG_PRODUCTION=false

  1. Deploying to heroku...

I. Open your browser and sign into Heroku
II. Navigate to the “Dashboard”
III. Select your newly created app
IV. Click “Deploy”
V. Under “Deployment Method” select “Github”
VI. Add repository name ({username}/{repositoryname})
VII. Click “Search”
VIII. Click “Connect”
IX. Select Branch
X. Click “Deploy Branch”
XI. Click “View”

It works on heroku server now :P