Skip to content

aqche/goterest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple Pinterest clone built with Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published