Skip to content

Peyton232/HTTPServerGenerator

Repository files navigation

HTTP Server Generator

GitHub release (latest by date)

GitHub issues Issues Closed Open Milestones Last Commit

A lightweight and super fast Go tool for generating a simple http server. Mainly meant for use in prototyping and hackathons

Creating a dart and go HTTP server is as simple as:

<INSERT COMMAND>

Features

  • None.

Future Features

  • Passing in of an openapi YAML to generate both dart reciever and go server
  • generate openapi files as well as the basic integrations for business logic and chi router system
  • Creation of custom dart and go models with 1 to 1 comparison
  • Comments mirrored in each codebase
  • Automatic restriction on illegal call types

Potential Future Features

  • CLI tool for ease of use
  • Automatic docker file creation
  • Automatic Swagger support and generation
  • Automatic DB setup (most liekly PSQL and MongoDB support)
  • Automatic status code correction
  • Automatic test file creation
  • Basic authorization cred setup
  • Interpretation of an existing go server and creating a dart reciever from this
  • Support default http and dio mode in dart (through run flag)
  • GraphQL support
  • GRPC support
  • Javascript/typescript server support

Input

Service name 
Get Post etc…
Query params (key value)
Query body (key value or json ) [maybe just json]

Output

Dart (meant to be inserted into an existing flutter app) All functions for each call seperted into files of each call type (GET, PUT, POST, etc...) A folder with models An empty var with server name (global to services) Go Functionaly complete http server .env file go.mod go.sum File structure and hierachy

Restrictions

Gets has no body

Different Use Cases

Approach #1: Directly pass in openAPI definition

Here is where I would explain this.

Approach #2: Pass in csv file location thorugh cli argument

Here is where I would explain this.

Approach #3: Turn on interpretation flag and pass in main.go of the server

Here is where I would explain this.

Development and contributing

Feel free to send pull requests and raise issues.

Acknowledgements

No one yet

FAQ

none yet

About

Generates a basic HTTP server end-to-end

Resources

Stars

Watchers

Forks

Packages

No packages published