NOTE: THIS PROJECT HAS BEEN RETIRED, IT IS NOT LONGER ACTIVE
What is this?
Govcode is an application that lists government open source projects. The purpose is to track what is being worked on and build analytics on top of it.
How to run it?
This application is structured as an API and a front end. The
hold the API code while the
front directory holds the front end.
All the steps mentioned below assume that you cloned the repo into a local folder.
To setup the API you need to do the following:
- Build the
cd govcode go build
- Get a github api key, go to https://github.com/settings/applications#personal-access-tokens and click "generate new token".
- Set up a postgres database with a new user, password and db just for govcode.
- Set the environment variables for the Postgres database and Github API key:
export GH_KEY="xxx" export PG_CONN_STR="postgres://govcode_user:email@example.com/govcode_db?sslmode=disable"
- Migrate the database to build all the tables:
- (Optionally) Run an import to populate the DB:
Now we have a loaded DB with the settings in the environment.
To actually run the server:
cd govcoded go run main.go
Or use gin:
go get github.com/codegangsta/gin cd govcoded gin
This should start the API on port 3000. You can change the port by setting the
PORT environment variable.
To run the front end:
- Install required npm packages:
cd front npm install npm install -g bower
- Install the bower packages:
- Run the server:
- Go to
http://localhost:9000on your browser
If you see an error about
compass you might need to install the compass ruby gem:
gem install compass
All contributions are welcome. You might want to create an issue describing what you want to work on to make sure the is no duplication.
This project is licensed under the MIT license.