Coder Social home page Coder Social logo

grocerer's Introduction

grocerer

Build Status Go Report Card License

NOTE: No longer maintained.

A RESTful API for

Prerequisites

For building and running:

  • docker
  • make
  • python3

For development:

  • go
  • golint
  • ./scripts/git/install-git-hooks.py

Make commands

make             # Print help
make build       # Build the container
make build-nc    # Build the container without caching
make clean       # Clean the project
make lint        # Run gofmt, golint, and go vet
make push        # Push the container to Docker Hub
make run         # Run the container
make stop        # Stop and remove the running container
make test        # Run the small (unit) tests
make test-large  # Run the large (end-to-end) tests

Backlog

* create tasks to convert project to AWS Lambda (reduce costs of EC2 instance)
* add AUTH header
* add check for "master" branch in pre-push hook
* add code coverage with codecov.io (e.g. [![Coverage](https://codecov.io/gh/etcd-io/etcd/branch/master/graph/badge.svg)](https://codecov.io/gh/etcd-io/etcd))
* add git pre-push hook to search for "DONTMERGE" messages
* add git pre-push hook to search for WIP commits
* add godoc (e.g. [![Godoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/etcd-io/etcd))
* add goimports to pre-commit.py
* add persistence of OurGroceries authentication cookie so tests do not re-login unnecessarily
* change GetList to use ourgrocer.Client
* change makefile with reference from https://vincent.bernat.ch/en/blog/2019-makefile-build-golang
* change push.sh to push.py for cross platform building
* change test package to <package>_test (https://medium.com/@benbjohnson/structuring-tests-in-go-46ddee7a25c package myapp_test; import ("github.com/benbjohnson/myapp"); func Test(t *testing.T) { ok(t, myapp.Function()) } )
* change to automatically sync of README on Github to the description on Docker Hub
* change to deploy to AWS EBS from travis-ci
* change to use a credentials helper for Docker username & password (https://docs.docker.com/engine/reference/commandline/login/#credentials-store)
* create a Dockerfile for development environment (i.e. `make dev` presents shell ready to edit and build: `/go/src/ $ go build`)
* fix "leftover" containers being created from make build
* fix volume mounting on WSL/Linux (https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly refer to "Running Windows 10 18.03+ or Newer" or "Running Windows 10 17.09")
* implement RuneReader inteface for io.Reader to use with regexexp.FindReaderIndex
* HttpsWithNoAPIGateway: call http.ListenAndServeTLS (https://blog.cloudflare.com/exposing-go-on-the-internet/ If I set up HTTPS for a single instance EBS, then the golang server itself must handle the HTTPS traffic.)
* HttpsWithNoAPIGateway: create a .ebextensions/lets-encypt.yaml (https://gist.github.com/tony-gutierrez/198988c34e020af0192bab543d35a62a https://medium.com/@jameshamann/ssl-certificates-with-rails-aws-elastic-beanstalk-and-lets-encrypt-8b047d527a60 https://hackernoon.com/easy-lets-encrypt-certificates-on-aws-79387767830b https://go-to-hellman.blogspot.com/2015/11/using-lets-encrypt-to-secure-elastic.html https://www.reddit.com/r/aws/comments/81udoh/https_for_eb_with_single_instance_ec2/ https://gist.github.com/syamn/8a37d3f0c050d0f9a9d5a0ddab9cb816 https://github.com/SammyHam/LetsEncrypt-SSL-config-for-Elastic-Beanstalk)
* HttpsWithNoAPIGateway: integrate the .ebextensions deployment with travis-ci (Create a zip file with the layout of: - .ebextensions/lets-encrypt.yaml - Dockerrun.aws.json)
* RemoveOpenAPIGen: add generate_swagger.py (switch the generation to generate the openapi.yaml from the Golang code's comment annotations https://devopstree.com/how-to-implement-swagger-api-server-for-golang-step-by-step-guide/)
* RemoveOpenAPIGen: commit the generated go-server code (once the server api is finalized, use the go-server code generated by opeanapi-generator as a basis for my code.  E.g. main.go, routers.go, model_version.go)
* RemoveOpenAPIGen: create a build Dockerfile (create a single Dockerfile based off the Dockerfile generated from openapi-generator)
* RemoveOpenAPIGen: extract Dockerfile.generate to OneNote
* RemoveOpenAPIGen: move main.go to /cmd directory
* RemoveOpenAPIGen: remove openapi-generator
* RemoveOpenAPIGen: replace import 'sw "./go"' with 'sw github.com/adammansfield/ourgroceries-rest-api/

grocerer's People

Contributors

adammansfield 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.