Skip to content

Simple application demonstrating the integration of several popular Go packages

License

Notifications You must be signed in to change notification settings

taalhach/Golang-Demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Velocity Works Coding Demo

Golang-Demo

This Golang application consumes a JSON payload from data.gov, populates expense Actuals database and displays the database contents on a web page.

Frameworks used:

Setup

Configuration file

Create a velocity_works.ini configuration file and place it wherever you want. Configuration should look like this

[main]
templates_directory = /home/hostname/path/to/proj-dir/Golang-Demo/contrib/templates


[database]
host = localhost
name = velocity_works
password =postgres
port = 5432
user = username

Export config path

put this line into ~/.bashrc file

export VELOCITY_WORKS_SETTINGS=path/to/config/velocity_works.ini 

change path/to/config/ with your config path.

Run migration

in order to run migration you need to install golang-migrate/migrate

after installing run this command from project's directory

 migrate -path ./contrib/migrations/ -database "postgres://USERNAME:@localhost:5432/DBNAME?sslmode=disable" up

change USERNAME and DBNAME with you username and dbname

Build

Run make command it will take care of rest

make

Help

./bin/velocity-worker --help

Sync database

./bin/velocity-worker sync_db

Serve UI api

./bin/velocity-worker serve_ui

About

Simple application demonstrating the integration of several popular Go packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 80.2%
  • HTML 19.0%
  • Makefile 0.8%