-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
cd $GOPATH/src
git clone git@github.com:hackerspainters/hp.git
Getting the app running on your local machine is straightforward. You can find out how to deal with dependencies in the project in the section below named "Dependencies".
Edit your user's .bash_profile to include export PROJ_CONFIG_PATH=$GOPATH/src/hp.
cd $GOPATH/src/hp
Create a config.json file as shown in the example configuration below
go install hp
go build
./hp
Now, we should be able to load http://localhost:5050/ in our browser
The first time we run go build (per the steps given below), we may be notified that we are missing certain dependencies. Simply run:
go install hp
to download and install all dependencies. It's the equivalent of python's pip install -r requirements.txt.
The app uses mongodb as a persistent data storage backend. So you will also need to install and run mongodb as well. Use your favorite package manager for this as required of course.
An example app configuration file is included in the source code, named as config.json.example in the project root directory. As mentioned in the "Running the app" section above, you will need to create a config.json of your own before you can run it as ./hp.
{
"DbName": "hp_db",
"SessionSecret": "(long random string here)",
"WebPort": 5050,
"TemplatePreCompile": true,
"TemplatePaths": ["./templates"],
"Debug": false,
"GoogleAnalyticsTrackingID": "UA-(your GA id)",
"Streams": [{
"type": "twitter",
"user_id": "(your twitter user_id)"
}, {
"type": "github",
"username": "calvinchengx",
"token": "(your github user token)"
}
],
"Gallery": {
"Type": "picasa",
"UserID": "(your picasa user id)"
}
}