Giter Club home page Giter Club logo

decentralizedwebwallet's Introduction

Sample Web App : Fabulous Faucet

Steps:

  1. modify the codes in /src

  2. npm install

  3. npm run build

  4. npm start

  5. open chrome to localhost:8080

Tools:

  1. ESlint : A javascript linter

  2. npm : A node module manager

  3. prettier A code formatter

  4. travis ci A unit/integration test schedulor

  5. webpack A javascript bundler(make multiple js files together)

  6. expressjs A totally awesome webapp framework

  7. babeljs A javascript compiler

  8. [react bootstrap]

  9. [react native]

Steps

npm install --save-dev @babel/core@^7.0.0-0

Design the logic

Write the codes

  1. Use express / react to create a simple web App. Create a server.js in the root folder. Add run script to package.json. Use npm start as the main start script.
import express from 'express';
import path from 'path';

const port = process.env.PORT || 8080;
const app = express();

app.use(express.static(path.join(__dirname, 'dist')));

app.get('*', (req, res) => {
  res.sendFile(path.resolve(__dirname, 'dist/index.html'));
});
console.log(`Listening on port ${port}`);
app.listen(port);

Bundle the js

  1. Define webpack.config.js
  2. Run webpack to create bundle.js
  3. embed the bundle.js into page.html

Configure run command

  1. Install babeljs to run the js codes
npm install --save-dev @babel/core @babel/node @babel/preset-react 
  1. Install webpack to bundle the js sourc
npm install --save-dev webpack webpack-cli
  1. Istall babel loader for webpack bundle
npm install --save-dev babel-loader
  1. Install eslint
npm install eslint-loader eslint  --save-dev
  1. Install flowJs for babel
npm install --save-dev babel-cli babel-preset-flow

decentralizedwebwallet's People

Contributors

luhuimao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.