url_shortener

command
v2.8.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2016 License: MIT Imports: 5 Imported by: 0

README

Description

This is a sample REST URL shortener service implemented using pgx as the connector to a PostgreSQL data store.

Usage

Create a PostgreSQL database and run structure.sql into it to create the necessary data schema.

Edit connectionOptions in main.go with the location and credentials for your database.

Run main.go:

go run main.go

Create or Update a Shortened URL

curl -X PUT -d 'http://www.google.com' http://localhost:8080/google

Get a Shortened URL

curl http://localhost:8080/google

Delete a Shortened URL

curl -X DELETE http://localhost:8080/google

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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