Comcast / Comcast/RestfulHttpsProxy

[Design] Wrap all of main.go as a struct

Open
#4 2 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Go
Stars
14
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## Problem
Right now, `main.go` is almost like an object. the limitation is that it cant be instantiated twice since it's not wrapped as a struct.

## Feature Description
Wrap `main.go` as a configurable structure. The new main.go will simply pass command line arguments to the structure when initializing it. This way multiple instances of the restful proxy can be established in one process. It makes sense to make the public API and proxy (currently port `9998` and proxy port `9999`) ports configurable via command line.

## Alternatives
Keep as is and just add port configuration.

## Additional Context
This task will be mostly reorganizing code in a logical way. Since this will touch the code required to do #5 it makes sense to do both at the same time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.