# README
Golang implementation of RealWorld app that adheres to the RealWorld spec and API.
Demo RealWorld
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