Skip to content

lemmon-714/ergo-js-template

 
 

Repository files navigation

Ergo JS Template - Entry Point to Ergo dApp Development

This project was bootstrapped with Create React App. It contains ergo-ts and ergo-lib libraries as dependencies and some examples to present how to use these libraries.

Goal

The goal of this template is to bootstrap JS dApp development for Ergo Blockchain. Ergo libraries, WASM support and several examples are already available in this template. These simple examples should help devs to get on board faster and start developing their ideas right away.

Since the template is structurally identical to an empty React project created by CRA, devs can simply and without any ergo-related barriers clone the project and build on top of it.

Examples

Available examples include:

  • Interacting with the explorer
  • Encoding different data types
  • Decoding fields (registers) of tokens

These examples are simple intentionally to be newcomer-friendly. These should help you to understand how to use ergo libraries and start developing your dApp.

Deploy Your dApp

To facilitate deploying your React app, docker file is already available for this template.

Just build your docker image locally using:

docker build -t mydapp

Or configure Dockerhub to build the image automatically for you when you push to a specific branch.

Then you can run/deploy your dApp easily using:

docker run -p 80:80 mydapp

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Learn React

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About

A JS template for Ergo dApp development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 59.0%
  • TypeScript 16.4%
  • HTML 14.3%
  • CSS 7.7%
  • Dockerfile 2.6%