goterest

module
v0.0.0-...-49120e8 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT

README

goterest

A simplified Pinterest clone built with Go.

goterest.png

Features

  • Registration and authentication.
  • Create and delete pins.
  • View all pins.
  • View a specific user's pins.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development. See deployment for notes on how to deploy the project.

Prerequisites

To run this application you need Go and PostgreSQL.

Local Setup

Clone the project.

git clone https://github.com/aqche/goterest.git

Setup a PostgreSQL database.

sudo -u postgres createdb goterest
sudo -u postgres psql -d goterest -f setup.sql

Create a role for working with the new database.

sudo -u postgres psql -d goterest
postgres=#CREATE USER <USER> WITH ENCRYPTED PASSWORD '<PASSWORD>';
postgres=#GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO <USER>;
postgres=#GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO <USER>;

Configure the application with the required environment variables.

export DATABASE_URL="user=<USER> password=<PASSWORD> dbname=goterest"
export SESSION_KEY="<SESSION_KEY>"
export CSRF_KEY="<CSRF_KEY>"
export ENV="DEV"

Start up the Go application.

go run ./cmd/web/

Built With

Contributing

Feel free to submit a pull request!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Acknowledgments

Directories

Path Synopsis
cmd
web
pkg

Jump to

Keyboard shortcuts

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