Git Product home page Git Product logo

go-speed's Introduction

GoSpeed

Simple Fileserver with Speedmanipulation Options and HTTPS.

Usage

Options

By default gospeed will listen on port 8080 and 8443 and uses a self signed certificate. You can pass a number of flags to customize it.

// options:
http: int // defines http port
https: int // defines https port
key: string // relative or absolute path to key file
cert: string // relative or absolute path to cert file
root: string // relative or absolute path to the servers root dir
defaultSpeed: float // default delays to server response times

For example speed -http=3000 -https=3001 -key=server.key -cert=server.crt -root=./dist -defaultSpeed=0.25

Custom Delay Response

In order to delay response of a given resource use a query param e.g. http://localhost:8080?speed=1 The number passed to speed is multiplied by one second. So the example above will delay the response for one second.

Generate your own Certs

# Generate key with algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Generate public key based on private key.
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650

go-speed's People

Contributors

jurekbarth avatar

Stargazers

 avatar  avatar

Watchers

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