psql-example

command module
v0.0.0-...-2fe36fd Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: MIT Imports: 7 Imported by: 0

README

Installation

  1. Create a PostgreSQL database named example
$ createdb example
  1. Update the connection string in the main() function on main.go

  2. Run or build the app:

$ go run main.go # or...
$ go build main.go
$ ./main
$ curl -i http://127.0.0.1:8000/
HTTP/1.1 200 OK
Date: Mon, 10 Feb 2020 09:20:08 GMT
Content-Length: 265
Content-Type: text/html; charset=utf-8
...

Released under MIT

Documentation

Overview

An example of using the github.com/lib/pq package to interface with a PostgreSQL database

Jump to

Keyboard shortcuts

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