https://github.com/1337programming/ethereum-example-dapp
Example Dapp with Ethereum using a pure Node.JS Environment
https://github.com/1337programming/ethereum-example-dapp
Last synced: 8 months ago
JSON representation
Example Dapp with Ethereum using a pure Node.JS Environment
- Host: GitHub
- URL: https://github.com/1337programming/ethereum-example-dapp
- Owner: 1337programming
- Created: 2017-04-09T03:27:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-11T20:15:29.000Z (almost 9 years ago)
- Last Synced: 2025-04-15T11:51:42.734Z (12 months ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ethereum Example Platform
Sample JavaScript platform for building applications with Ethereum Solidity smart contracts.
## Requirements
To run this demo locally, you actually don't need any full Ethereum library, just Node.JS. However you cannot upload smart contracts to a live blockchain
For live deployments get either eth or geth or whatever SDK you prefer.
## Setup
* `git clone https://user.id@innersource.accenture.com/scm/et-si-bc/blockchain-academy-ethereum-platform.git`
* `cd blockchain-academy-ethereum-platform/`
* `npm install`
* (Optional) `npm install truffle -g`
## Building and the frontend
1. `npm run testrpc` to start a test blockchain instance
2. First run `npm run compile`, then run `npm run migrate` to deploy the contracts onto your network of choice (default "development").
3. Then run `npm run dev` to build the app via webpack and serve it on http://localhost:8080
## Deploying to a live Blockchain
@TODO use geth or eth
## Scripts
Run `npm run `:
* lint: Lint code
* build: Builds application
* dev: Serves application
* serve: Serves application
* testrpc: Runs a test ethereum blockchain
* test: Runs JS and SOL tests
* compile: Compiles SOL smart contracts
* deploy: Deploys smart contracts to blockchain
## Common Errors
* **Error: Can't resolve '../build/contracts/MetaCoin.json'**
This means you haven't compiled or migrated your contracts yet. Run `npm run compile` and `npm run migrate` first.
Full error:
```
ERROR in ./app/main.js
Module not found: Error: Can't resolve '../build/contracts/MetaCoin.json' in '/Users/tim/Documents/workspace/Consensys/test3/app'
@ ./app/main.js 11:16-59
```