Coder Social home page Coder Social logo

klim0v / golang-revel-realworld-starter-kit Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 356 KB

Exemplary real world backend API built with Golang + Revel

Home Page: https://realworld.io

Go 91.00% HTML 8.45% Dockerfile 0.55%
realworld docker backend nginx-proxy crud golang jwt-authentication

golang-revel-realworld-starter-kit's Introduction

RealWorld Example App

Golang + Revel codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This codebase was created to demonstrate a fully fledged fullstack application built with Golang + Revel including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Golang + Revel community styleguides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

Below is the recommended layout of a Revel application, supplemented with domain entities and services.

my_gocode/ - GOPATH root
    src/ - GOPATH src/ directory
        github.com/revel/revel/ - Revel source code
        bitbucket.org/me/sample/ - Sample app root
            entities/ - domain entities
            app/ - app sources
                controllers/ - app controllers
                    init.go - interceptor registration
                models/ - app domain models
                jobs/ - app domain jobs
                services/ - app domain services
                routes/ - reverse routes (generated code)
                views/ - templates
                tmp/ - app main file, generated code
            tests/ - test suites
            conf/ - configuration files
                app.conf - main configuration file
                routes - routes definition file
            messages/ - i18n message files
            public/ - static/public assets
                css/ - stylesheet files
                js/ - javascript files
                images/ - image files

Getting started

  1. Install docker and docker-compose to your system
  2. Add 127.0.0.1 api.realworld.wip to your /etc/hosts file
  3. Copy .env.docker to .env in the project root
  4. Start nginx-proxy
  5. Generate a Docker bundle from the Compose file docker-compose build
  6. Create and start containers docker-compose up
  • To start the nginx-proxy, type the following command:

docker run -d -p 80:80 -p 443:443 --name nginx-proxy --net reverse-proxy -v $HOME/certs:/etc/nginx/certs:ro -v /etc/nginx/vhost.d -v /usr/share/nginx/html -v /var/run/docker.sock:/tmp/docker.sock:ro --label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true jwilder/nginx-proxy

golang-revel-realworld-starter-kit's People

Contributors

alonski avatar ericsimons avatar esakkiraj avatar klim0v avatar optikfluffel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.