2022-11-03 16:57:55 +01:00
2019-07-12 12:04:29 +02:00
2022-10-31 12:48:49 +01:00
2020-07-09 23:53:06 +02:00
2020-06-02 11:55:29 +02:00
2022-10-06 12:29:57 +02:00
2020-05-09 17:07:35 +02:00
2018-04-01 03:16:22 +02:00
2019-06-12 16:27:01 +02:00
2022-10-06 12:29:03 +02:00
2019-03-26 22:10:30 +01:00
2022-11-03 16:57:55 +01:00
2022-11-03 16:57:55 +01:00
2022-05-01 14:19:45 +02:00
2020-05-09 17:07:35 +02:00

Build Status

kredits-web

This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here.

Development

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone git@github.com:67P/kredits-web.git this repository
  • cd kredits-web
  • npm install

Building/running for development

See working with locally deployed contracts for details on how to develop with locally deployed contracts.

Code generators

Make use of the many generators for code, try ember help generate for more details

Running tests

  • ember test
  • ember test --server

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

(You need collaborator permissions on the 5apps Deploy project.)

npm run deploy

Working with locally deployed contracts

The smart contracts and their JavaScript wrapper library are developed in the kredits-contracts repo/package.

You can run kredits-web on your machine, against a local, simulated blockchain. kredits-contracts contains all the tools to start and set up such a simulated network, as well as to deploy the Kredits smart contracts to it.

These are the basic steps to get up and running:

1. IPFS

Run a local IPFS deamon.

  • Make sure CORS headers are configured. See IPFS for more info.
  • ipfs daemon

2. kredits-contracts

Run a local devchain with test data. (See kredits-contracts README for details.

  • Clone kredits-contracts
  • npm install
  • npm run devchain - runs a local development chain
  • npm run bootstrap - deploys all contracts and seeds test data
  • npm link - makes the kredits-contracts module linkable as kredits-contracts on your machine

3. kredits-web

With IPFS and the local devchain running, you can now link the contracts and start the Ember app:

  • npm link kredits-contracts - links the local kredits-contracts package (has to be done again after every npm install)
  • npm run start:local - runs the Ember app with WEB3_PROVIDER_URL=http://localhost:8545 set

4. Metamask network

If you want to interact with the local contracts via a Web3 wallet, switch the network to a "Custom RPC" one, with the RPC URL http://localhost:8545.

IPFS

If you haven't configured your IPFS node for CORS yet, you can do so by running the following commands:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["localhost:4200"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080
2.3.0 Latest
2025-02-17 06:35:52 +00:00
Languages
JavaScript 97.8%
Handlebars 1.4%
SCSS 0.7%
HTML 0.1%