davidsoft318 / polkaswitch-ui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

polkaswitch-ui

Developer Start Guide

Introduction

This is a simple full stack React application with a Node.js and Express backend. Client side code is written in React and the backend API is written using Express. This application is configured with Airbnb's ESLint rules and formatted through prettier.

Development mode

In the development mode, we will have 2 servers running. The front end code will be served by the webpack dev server which helps with hot and live reloading. The server side Express code will be served by a node server using nodemon which helps in automatically restarting the server whenever server side code changes.

Production mode

In the production mode, we will have only 1 server running. All the client side code will be bundled into static files using webpack and it will be served by the Node.js/Express application.

Quick Start

# Clone the repository
git clone https://github.com/polkaswitch/polkaswitch-ui.git

# Go inside the directory
cd polkaswitch-ui

# Install dependencies
yarn (or npm install)

# Start development server
yarn start (or npm run start)

# Start webpack hot-reload react bundle
yarn watch (or npm run watch)

Documentation

Folder Structure

All the source code will be inside src directory. Inside src, there is client and server directory. All the frontend code (react, css, js and any other assets) will be in client directory. Backend Node.js/Express code will be in the server directory.

ESLint

I am using Airbnb's Javascript Style Guide which is used by many JavaScript developers worldwide. Since we are going to write both client (browser) and server side (Node.js) code, I am setting the env to browser and node. Optionally, we can override the Airbnb's configurations to suit our needs. I have turned off no-console, comma-dangle and react/jsx-filename-extension rules.

About


Languages

Language:JavaScript 75.4%Language:SCSS 21.9%Language:EJS 1.5%Language:HTML 1.0%Language:Python 0.3%