wall_api

command module
v0.0.0-...-5f863c8 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Unlicense Imports: 33 Imported by: 0

README

Wall-API

WallAPI Coverage Go Report Card

Features

  • A CRUD API for Messages
  • ORM Layer to PostgreSQL via go-orm
  • A WebSocket server that emits Message objects on reception of POST /message

How to run

Have a Postgres instance running via Docker:

o11y/apps/wall_api$ docker run -e POSTGRES_DB=wallapi -e POSTGRES_USER=user -e POSTGRES_PASSWORD=foobar -p 5432:5432 -d  postgres:16

Build and start the API

o11y/apps/wall_api$ go build -o wallapi
o11y/apps/wall_api$ ./wallapi
NAME:
   wall-api - An API for the Wall Application

USAGE:
   wall-api [global options] command [command options] [arguments...]

COMMANDS:
   run      Run the API server
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

o11y/apps/wall_api$ ./wallapi run --dbHost 127.0.0.1 --dbUser user --dbPassword foobar --port 8080 --dbName wallapi

Run the test suite:

$ go test ./... -cover
ok      github.com/chazapp/o11/apps/wall_api    0.450s  coverage: 26.4% of statements
?       github.com/chazapp/o11/apps/wall_api/api        [no test files]
?       github.com/chazapp/o11/apps/wall_api/metrics    [no test files]
?       github.com/chazapp/o11/apps/wall_api/models     [no test files]
?       github.com/chazapp/o11/apps/wall_api/ws [no test files]

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