You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/vincentserpoul/realworld-go-oapi-codegen-chi-pgx

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/vincentserpoul/realworld-go-oapi-codegen-chi-pgx

v0.0.26
Source
Go
Version published
Created
Source

checks sec, lint build Coverage Status

RealWorld Example App

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 pgx, oapi-codegen and chi including CRUD operations, authentication, routing, pagination, and more.

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

How it works

Forget your ORMs, this implementation is leveraging deepmap/oapi-codegen/v2, go-chi/v5 and pgx/v5.

Getting started

What you need

Setting up the config

Copy the content of config/api/secrets.sample.yaml to config/api/local.secrets.yaml

Run

    make infra-local-up
    make db-migration-up
    go run cmd/api/main.go

Running the test suite

After all the setup is done, in one terminal, run:

go run ./cmd/api/main.go

and in another, you run:

APIURL=http://localhost:8083 ./api/run-api-tests.sh

Enabling otel traces

Follow the (README)[infra/local/README.md].

Contributing

Pre commit hooks

Make sure you install pre-commit and set it up as following:

pre-commit install -t commit-msg -t pre-commit -t pre-push

Signed commits

IF you want to sign your commits, you can check how to here and here and here.

FAQs

Package last updated on 16 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts