Skip to content
forked from 18F/revampd

Basic tutorial for the EPA Clean Air Markets Division to go through the process of creating a small web app, in the problem space of AMPD, with automated tests and deployment to cloud.gov at https://revampd.app.cloud.gov

License

Notifications You must be signed in to change notification settings

maheese/revampd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

revAMPD

Build Status Code Climate Go Report Card Codecov Known Vulnerabilities

Basic tutorial for the EPA Clean Air Markets Division to go through the process of creating a small web app, in the problem space of AMPD, with automated tests and deployment to cloud.gov.

Currently, revampd is a simple static file frontend and an API backend.

Development

Initial setup

Dependencies

This project uses Docker containers to provide a self-contained build and test environment, as well as to locally run the revampd web service and static file web server. These instructions assume some familiarity with the command-line (e.g., Windows Terminal under Windows 10, Terminal under macOS, etc.).

Clone the repository

Clone the repository and cd into it:

git clone https://github.com/18F/revampd
cd revampd

Tests

Run the initial setup and ensure that all tests pass locally:

docker-compose run --rm api make

Running local servers

Start the web server and backend API service:

docker-compose up --abort-on-container-exit --build

Log messages will be printed to the console's stdout.

Once the revampd_web_1, revampd_db_1, and revampd_api_1 instances have started up, a web browser can be directed to http://localhost:9080 to access the frontend. The API backend can be access directly at http://localhost:8080.

Stopping and cleaning up the local server

Ctrl+C will shutdown the server, if performed in the same console window as it was started.

Using a different console window — on the same host OS, from the revampd project tree — the local server can be stopped and cleaned up with:

docker-compose down

Adding/updating Go packages

Whenever the packages used by revampd change, update the Dep files:

docker-compose run --rm api dep ensure -no-vendor
docker-compose build

Be sure to commit the dep-generated updates to src/Gopkg.toml and src/Gopkg.lock.

About

Basic tutorial for the EPA Clean Air Markets Division to go through the process of creating a small web app, in the problem space of AMPD, with automated tests and deployment to cloud.gov at https://revampd.app.cloud.gov

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 33.5%
  • Shell 33.2%
  • HTML 19.7%
  • Dockerfile 10.4%
  • Makefile 3.2%