lolcatz-backend

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

LolCatz Backend

Manage funny cat pictures. Or any other kind of pictures, really.

Build

go build -o bin/server .

Usage

  • Build the server binary
  • Create an S3 bucket and set up credentials via the default AWS credentials chain
  • Start the frontend (take note of the browser URL for the CORS origin header)
  • Note: you may omit -cors-allow-origin but this is recommended only for development purposes
  • Start the server:
bin/server -bucket <bucket> -region <region> -cors-allow-origin http://localhost:3000

Database Config

Default database config assumes postgres on localhost:5432, database lolcatz, password default. To customize:

bin/server -bucket <bucket> -region <region>
  -db-host <my-db-hostname>
  -db-user <my-db-user>
  -db-password <my-db-password>
  -db-name <my-db-name>

Change HTTP Port

By default the http server will bind to localhost:8000 which is suitable for development. To customize, use the -bind option.

bin/server -bind=localhost:9000 ...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
db
s3

Jump to

Keyboard shortcuts

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