Giter Site home page Giter Site logo

zacharysierakowski / grend-kit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.29 MB

A starter kit for Golang, React v16, Express, Nginx and Docker

License: MIT License

Makefile 8.59% Go 22.93% JavaScript 63.95% HTML 1.81% Dockerfile 2.72%
golang docker react

grend-kit's Introduction

grend-kit

A starter kit for Golang, React v16, Express, Nginx and Docker.

Building

make

Run make from the root directory to build the Golang service (grend-service by default), Nginx proxy (grend-nginx by default), and UI (grend-ui by default) docker images. The image names can be updated by passing in different names to the make command or updating the defaults in Makefile.

Running

docker-compose up -d

Run docker-compose up -d from the ./docker directory to run all images together. The compose file to run the images can be found here. If you updated the image names built in the Makefile, update the corresponding names in the compose file as well.

To view the UI, navigate to http://localhost:80.

Contributing

See CONTRIBUTING


G - Golang Service

The golang service is a simple server that handles one request to /health. This endpoint returns a "Service is running normally" string.

R - React UI

The UI image is built with React. The ui makes a request to the go service /health and also has a Error boundary setup for an example error. Run yarn start from ./js/react to serve up the app on http://localhost:3000.

E - Express Server

The express server is setup to serve up the react application on the root path (/). POST requests to /mail use nodemailer to build and send emails. The body of the request should be JSON in the following format:

{
  subject: "", 
  name: ""
}

N - Nginx Proxy

The nginx proxy is setup to pass all / requests over to the UI image (grend-ui by default). Requests made to /service will be proxied to the golang service image (grend-service by default). To make changes to the proxy, edit nginx.conf.

D - Docker

The ./docker directory contains a docker compose file to run each of the built images. There are Dockerfiles for each image here, here and here.

grend-kit's People

Watchers

James Cloos 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.