www

command module
v0.0.0-...-bf229e6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 6 Imported by: 0

README

HackSoc Web Application

The official website of HackSoc from The University of Manchester. We also have a Facebook and LinkedIn page!

Getting Started

Follow these instructions to run the website on your local machine.

Prerequisites
Required
  • Download and install the Go distribution from here.
Optional
  • Enabling reCAPTCHA requires a secret key and a site key. The first two steps of this tutorial explain how to get them.
  • To enable SendGrid, create a free account and get an API key.
  • A MySQL database is needed by certain features (such as signing up). Run the queries from the sql folder to generate the required tables in a new database. To connect the website to the database, a data source name (DSN) must be provided. Read this for details on how a DSN string is formatted.

If you choose to ignore these optional prerequisites, certain parts of the website may be deactivated or not work as expected.

Installing
Download the Package

Install the package to your $GOPATH using the go tool from the command line:

$ go get github.com/hacksoc-manchester/www

Make sure Git is installed on your machine and referenced by your system's PATH.

Environment Variables

Create a file called .env in the project root directory and make sure it's added in .gitignore (if using Windows, you might have to name it .env.). Paste the following text in the file and edit the variable values sensibly:

HTTP_PLATFORM_PORT="default port is 8080"
NOREPLY_EMAIL="noreply email used by the SendGrid API"
CONTACT_EMAIL="contact email used by the SendGrid API"
SYMMETRIC_KEY="personal symmetric key (can be of length 16, 24 or 32). keys are more secure"
RECAPTCHA_SITE_KEY="your reCAPTCHA site key"
RECAPTCHA_SECRET_KEY="your reCAPTCHA secret key"
MYSQL_CONNECTION_STRING="your MySQL connection string"
SENDGRID_API_KEY="your SendGrid API key"
FB_USER_TOKEN="your Facebook user token"
Starting the Website

Go to the hacksoc-manchester/www folder and run the following go command in your shell:

$ go run app.go
Running Tests

Go to the hacksoc-manchester/www folder and run the following go command in your shell to run the predefined tests:

$ go test ./...
Authors

See the CONTRIBUTORS file.

License

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
helpers
services

Jump to

Keyboard shortcuts

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