GithubHelp home page GithubHelp logo

goreact's Introduction

Go/React Web app

Overview

This is a web application that can be used to receive data over REST interface, store in a db, and then display it.

Technologies

  • Go (backend)
    • https://golang.org/
    • used on the server (backend)
    • greatly simplifies development and deployment
    • very popular in new companies and startups
    • cross platform -- can easily target Linux, MacOS, or Windows.
    • relatively "safe" language
      • statically typed so compiler catches a lot of problems
      • garbage collected (memory leaks are very rare)
    • Go is efficient and well suited for embedded Linux targets
      • compiles to a single, statically linked binary that is relatively small
      • compiled and runs similar to C/C++
  • React (frontend)
  • Bootstrap 4 (css toolkit)
  • https://parceljs.org/ (frontend build)
    • very powerful and simple frontend build tool
    • development and production modes
    • in development, automatically updates page in browser if sources change.

Additional Note:

  • all assets and files (including the frontend) are embedded in the golang server binary. This makes deployment of new versions very simple for development or production -- all you need is a single binary.
  • There is no separate run-time to install (like Python, Ruby, Nodejs, Java, or C# environments). Everything is statically included in the binary. Again, this makes deployment very simple.
  • there are no dependencies or stack that needs to be installed on the server -- only a single binary.

Setup

To set up a build environment (only tested under Linux):

Production Build

  • app_build (build Linux production binaries)
  • app_build_windows (build windows binaries)
  • ./goreact

Development

Install the following:

The following commands can be run (in separate terminal windows) during development. Any time one of the source files in the project are changed, then appropriate parts of the project are rebuilt, and automatically reloaded (if frontend change).

  • app_watch_backend
  • app_watch_frontend

Editors/Tooling

There are a number of editors that support Golang and React development very well including Vim, Atom, Visual Studio Code, etc. If you don't have a strong preference, Visual Studio Code is a good one to start with.

Visual Studio

Visual Studio Code is an advanced editor that runs well under Linux, and has extensions for both Go and Elm development. It also integrates well with Git and allows you to commit/push changes to a git repo directly from the editor.

To install:

Visual Studio is configured to auto-format Go and Javascript code automatically when saved.
This helps keep code clean looking and consistent.

VS Code also has an integrated terminal that will allow you to run the app_build from within your editor.

goreact's People

Contributors

cbrake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goreact's Issues

App deploy

Hi!
Sorry I had to open an issue but I couldn't find a way to contact you.
I was wondering if you can give a guide on how you run you app. Is it through go or npm start?
How where you able to connect back end and front end?

I am new to this and I keep on loosing track on what to do. I really hope you can help me.
Thanks!

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.