Giter Site home page Giter Site logo

cycling-coach-lab's Introduction

Cycling Coach Lab

This is a Go project that uses the Echo framework for building web applications and the Templ package for rendering HTML templates.

Prerequisites

  • Go 1.22.0 or later
  • Docker (for building and running the Docker image)
  • migrate (for running database migrations)
  • direnv (for loading automatically environment variables from the .env file)

Setup

  1. Make sure the your Go setup is completed: Paste the following in your $HOME/.zshrc
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
  1. Install the dependencies:
go install github.com/cosmtrek/air@latest
go install github.com/a-h/templ/cmd/templ@latest
go install go.uber.org/mock/mockgen@latest
make init
  1. Setup you .env file. See .env.template

Local Development

To run the server and watch for file changes simultaneously, follow these steps:

  1. Open two separate terminal tabs.
  2. In the first tab, start the server on port 3000 with the following command:
make start
  1. In the second tab, generate the styles.css file by watching for file changes:
make tailwind

Run App using Docker

  1. First, build the Docker image:
make docker-build
  1. Then, run the Docker image:
make docker-run

This command will start the server on port 8080.

Testing

To run the unit tests:

make test

To get test coverage:

make test-coverage

To generate mocks:

make generate-dev

To update snapshots:

make update-snapshots

K8s development

To test the kubernetes deployment you can install minikube on your dev maschine.

  1. Install minikube on your maschine
  2. Init minikube
minikube start --vm-driver=docker --alsologtostderr
  1. Test minikube
kubectl get pods -A

Contributing

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

License

This project is licensed under the LICENSE - see the LICENSE file for details

cycling-coach-lab's People

Contributors

michelm117 avatar nebler avatar github-actions[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.