Skip to content

manjeet-thadani/koa-trufflebox

Repository files navigation

Koa-Box

A truffle box to serve as the foundation of any Truffle and Koa.js dApp.

This Box Uses NodeJS(Koa JS) to provide API endpoints to the Ethereum Blockchain smart contract so that this smart contract can be used in Android/Ios Apps as well.

  • Production grade lightweight JSON based logging utility
  • configurable env's based on current NODE_ENV
  • Error handling middlewares
  • Easily pluggable controllers and routers
  • The project structure is highly modular and can be directly used or extended for production purpose

Pre-Requisites

  1. NodeJS
  2. Yarn Or NPM
  3. GanacheCLI
  4. Truffle

Installation

  1. Install Truffle and Ganache CLI globally.
npm install -g truffle
npm install -g ganache-cli
  1. Download the box. This also takes care of installing the necessary dependencies.
truffle unbox manjeet-thadani/koa-trufflebox

  1. Install all the node modules required by running:
// install all the node modules using npm
npm install

or if you prefer yarn

//install all the node modules using yarn
yarn install
  1. Start truffle development console using
truffle develop
  1. Inside the truffle console run compile to compile the contracts

  2. You can see that a new /build folder has been created in the root directory which contains the compiled contracts.

  3. Now these contracts need to be deployed on the Blockchain. For this, run migrate inside the truffle development console

  4. To run the Koa server yarn start or npm start

  5. In the browser window open http://localhost:8081/.

Collaborators

  1. MANJEET THADANI
  2. CHIRAG MALIWAL

About

Truffle box to get up and running quickly with Koa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published