/swebs

A simple, ready to use, web server for tests !

Primary LanguageGoApache License 2.0Apache-2.0

GitHub Logo A simple, ready to use, web server for tests !

What it does ?

  • Listen on a port
  • Replay with the content of "resources" directory.
  • Simulate a JSON api via websocket (eg. You ask for "thing" and he replay with the content of json/thing.json)

Configs

You can change via flag this settings:

  • -port ( Default: 9393 )
  • -checkdir (Default: true. it creates the directory if not exists)
  • -ws (Default: true. Enables the websocket thingy you read before )

How to get it work ?

No dependencies, no nothing. Just click on the executable and you are ready.

I dont know how to click.

Here you go my little friend:

How to Click

Building

To build for your platform, use one of the following commands:

GOOS=windows go build -o bin/win/swebs.exe
GOOS=darwin go build -o bin/osx/swebs