hp

command module
v0.0.0-...-754593e Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2014 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Site for hackersandpainters.sg

Build Status

Getting started: Dev environment

You will also need to install mongodb. This project uses the mgo library to persist data.

# Prepare directory and source code
mkdir -p $HOME/go/{src,bin,pkg}
cd $HOME/go/src
git clone git@github.com:hackerspainters/hp.git

# Set environment variables
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
export PROJ_PATH=$HOME/go/src/hp

# Get dependencies, build and run tests
cd $PROJ_PATH
go get ./...
go build ./...
go test ./...

# Run the project
go run main.go

# Then, browse to http://localhost:3000

Contributions and Deployment

Contributions are more than welcome and pull requests should be made to the develop branch. Contributors should write unit tests.

Deployment is completely automated in a continuous deployment set-up with drone.io on master branch.

Example deployment script

#! /usr/bin/bash
export HOME=/home/web
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
echo $GOPATH
echo $PATH
mkdir -p $GOPATH/{src,bin,pkg}

export PROJ_PATH=$GOPATH/src/hp
rm -rf $PROJ_PATH
cp -rf $HOME/hackerspainters $PROJ_PATH

echo "Delete existing config.json"
rm $PROJ_PATH/config.json
echo "Use production server's config.json"
cp $HOME/config.json $PROJ_PATH/

cd $PROJ_PATH
pwd

go get ./...
go install ./...

echo "Installation completed. Restarting service..."
sudo systemctl restart hp

echo "Clean up deployment directory"
rm -rf $HOME/hackerspainters/*

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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