go-realworld

command module
v0.0.0-...-78b87b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 5 Imported by: 0

README

RealWorld Example App

Go net/http codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
Demo    RealWorld

This codebase was created to demonstrate a fully fledged fullstack application built with Go net/http library including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Golang 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

The project structure was inspired by two posts on Ben Johnson's blog which can be found here and here.

Getting started

This project uses Go version 1.17 and postgresql 14 You also need to have migrate tool installed to run all migrations against the database

Locally
  • make sure Go is installed on your machine.
  • make sure to have the postgresql database installed locally or remote
  • set the .env file or env var as shown in the .env.example file
  • run the migrations in postgres/migrations or run make run-migration
  • fetch all dependencies using go mod download
  • run make run to start the server locally
TODO
  • Revisit error handling

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL