Git Product home page Git Product logo

go-starter-server's Introduction

Go Starter Server

This project is a simple but complete example of a GO server built using an API-first approach and oapi-codegen. The server implements a typical petstore case and is set up for Docker Compose, but can easily be modified to work with other container orchestration tools such as Minikube or K3s. The server implements a typical petstore case.

The project's file structure is organized and easy to navigate, with a clear separation between the server's code and the API code. The Makefile provides easy-to-use commands for building the project and generating the API code. Additionally, the README.md file provides clear and concise instructions for setting up and running the project.

Prerequisites

To run this project, you will need:

  • Docker installed and running.

Getting Started

To get started with this project, follow these steps:

  1. Run the server using Docker Compose: docker-compose up.
  2. Access the server at http://localhost:3000.

Building the Project

To build the project, simply run make build in the project directory. This will build the binary in the current directory.

Generating the API Code

To generate the API code, run make openapi-codegen. This will generate the necessary Go files for the server based on the OpenAPI specification file.

Running the Project

To run the project, use Docker Compose:

shCopy code

docker-compose up

This will start the server and Nginx. You can access the server at http://localhost:3000.

Notes

  • The server uses a self-signed certificate for testing purposes. In a production environment, you should use a valid SSL certificate.
  • The project is set up for Docker Compose, but it can easily be modified to work with other container orchestration tools such as Minikube or K3s.
  • Testing testing ...

go-starter-server's People

Contributors

dill-dall avatar

Watchers

 avatar

go-starter-server's Issues

Set up DynamoDB/MongoDB integration for Go app

Description: Integrate a DynamoDB/MongoDB database into our Go app to persist data. The integration should be simple and logical, and the data should match our API types.

Steps to reproduce:

  1. Research and select a Go package for DynamoDB/MongoDB integration.
  2. Create a new branch in the repository and install the necessary dependencies.
  3. Define the data model for the DynamoDB/MongoDB database based on the API types.
  4. Write the code to interact with the database using the chosen Go package.
  5. Test the database integration to ensure it's working properly.
  6. Merge the branch into the main branch and deploy to the production environment.

Expected outcome:

  • A simple and logical integration of a DynamoDB/MongoDB database into the Go app.
  • Data that matches our API types and is persisted in the database.
  • A documented process for setting up and maintaining the database integration.

Additional information:

  • I think the best apporach is DynamoDB and using LocalStack for development setup for dynamodb

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.