Code Monkey home page Code Monkey logo

golang-realworld-example-app's Introduction

RealWorld Example App

Golang implementation of RealWorld app that adheres to the RealWorld spec and API.

This is a RealWorld example application built with Gin and the Ent framework. It demonstrates a backend implementation for a blogging platform with features such as articles, comments, tags, and user profiles.

You might also check out the Frontend implementation in Nuxt3.

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

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Go 1.16 or higher

Setting Up the Development Environment

1. Start the MySQL database container:

Use the provided docker-compose.yml file to start a MySQL container:

$ docker-compose up -d

This will create a new MySQL database named golang_realworld.

2. Configure environment variables:

Copy the example environment file and edit it to match your local setup:

$ cp .env.example .env
$ vim .env

3. Start the server:

Run the following command to start the server:

$ go run main.go

The server will automatically create the required database schema if the connection to the database is successful.

Running Tests

To run the end-to-end tests, execute the following command:

$ make test-e2e

golang-realworld-example-app's People

Contributors

k0kishima avatar

Stargazers

Maksym Litvynov avatar  avatar

Watchers

 avatar

Forkers

pmprovectus

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.