GithubHelp home page GithubHelp logo

bar's Introduction

React Go Boilerplate

Description

A boilerplate for fastly building web application based on React & Go.

Requirements

  1. Linux or Mac OS
  2. Node.js (7.10.0 or higher)
  3. Go (1.8.1 or higher)

Features

  • Frontend

    • Components powered by React
    • State management powered by Redux
    • Stylesheet management powered by Radium
    • Fully-featured router management powered by react-router
    • Hot reload powered by react-hot-loader (module level hot reload only for stateful component)
    • Auto re-lint your js/jsx files after editing powered by eslint-watch
  • Backend

    • Web framework powered by Gin
    • Hot reload powered by another Gin

Usage

For Development

  1. Clone the repo and install all dependencies:

     go get github.com/MrHuxu/react-go-boilerplate && cd $GOPATH/src/github.com/MrHuxu/react-go-boilerplate
    
     go get github.com/gin-gonic/gin
     go get github.com/codegangsta/gin
     npm install
    
  2. It's recommended to install the React DevTools and Redux DevTools for frontend debugging.

  3. Launch the server:

     # execute the command below, then you'll see the dashboard shown
     # go visit http://localhost:8283 in your browser
     # editing any file will let the server or frontend reload
    
     npm run dev
    

For Deployment

It is highly recommended to use Docker to deploy this project!!

Using Docker

  1. Clone the repo and build Docker image:

     go get github.com/MrHuxu/react-go-boilerplate && cd $GOPATH/src/github.com/MrHuxu/react-go-boilerplate
     docker build . -t react-go-boilerplate
     docker run -p 13109:13109 -d react-go-boilerplate
    
  2. Use docker logs command to monitor the logs of the server:

     docker logs -f [container_id]
    

Manually Build

  1. Clone the repo and install all dependencies(same as above).

  2. Launch the server:

     # go visit http://localhost:13109 in your browser after executing the command
    
     npm run prd
    

bar's People

Contributors

mrhuxu avatar

Stargazers

 avatar Harri Feng avatar  avatar  avatar

Watchers

Harri Feng avatar James Cloos avatar  avatar  avatar

Forkers

harrifeng

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.