url_shortener

command
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: MIT Imports: 6 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