Skip to content

lukashambsch/anygym.api

Repository files navigation

AnyGym API

API & Database interactions for AnyGym data.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

Give examples

Installing

A step by step series of examples that tell you have to get a development env running

If you don't already have glide, install it.

curl https://glide.sh/get | sh

Install project dependencies

glide install

End with an example of getting some data out of the system or using it for a little demo

Set environment

You'll want to set the correct environment before running migrations or starting the web server.

For testing...

export GOENV=test

For local development...

export GOENV=local

Running the migrations

Run all of the database migrations to build the db and populate necassary static data

go run store/migrations/migrate.go -up

Run all of the database migrations to delete all data and completely tear down the database

go run store/migrations/migrate.go -down

Build the project

Run the go build command from the root of the project

go build

Start the web server

Run the executable generated by building the project

./anygym.api

You can also use CompileDaemon to automatically build the project and start the web server each time a files changes.

CompileDaemon -command=./anygym.api

Running the tests

Run all of the automated tests with the test shell script.

source test.sh

Or run them manually w/ the go test command.

export GOENV=test
go run store/migrations/migrate.go -up
go test -cover -v $(go list ./... | grep -v /vender/)

Or run a single test suite using the go test command

go test ./store/datastore -v

where ./store/datastore is the path to the dir containing the test suite

Break down into end to end tests

Explain what these tests test and why

Give an example

And coding style tests

Explain what these tests test and why

Give an example

Deployment

Add additional notes about how to deploy this on a live system

Built With

  • Dropwizard - The web framework used
  • Maven - Dependency Management
  • ROME - Used to generate RSS Feeds

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

See the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published