Coder Social home page Coder Social logo

gencebay / httplive Goto Github PK

View Code? Open in Web Editor NEW
1.1K 28.0 58.0 9.49 MB

HTTP Request & Response Service, Mock HTTP

License: MIT License

Go 99.55% HTML 0.16% JavaScript 0.29% Dockerfile 0.01%
http-tool mock-server api proxy-testing tooling http-rest-api restful postman

httplive's Introduction

Build Status

The HttpLive is a tool for API designers, Proxy, mobile and web application developers to develop and test their applications faster without being dependent on any server or backend applications.

HttpLive has a built-in user interface. Therefore, you can do all the configurations you need on this UI, and with dynamic URL (Routing) definitions you can specify your own JSON return types for your applications.

You can share the key-value database (httplive.db) with your teammates, easily back up or store it in the any cloud storage.

Load balancing, Round-robin operations can be operated easily with multi-port mode.

With the support of HttpLive you; we can make it more useful without compromising on simple usage and increase the productivity of our development and testing environments.

Installation

go get github.com/gencebay/httplive

With this command you can add the httplive application to the path you specify in the Go environment. This way you can run the application from the command line.

Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used with help (-h) flag:

httplive -h

Arguments

--dbpath, -d

Fullpath of the httplive.db with forward slash. If not present, default db name (httplive-1a.db) will be used.

--ports, -p

Hosting ports can be array comma separated string <5003,5004> to host multiple endpoint. First value of the array is the default port.

HttpLive creates a key-value database for the URLs you define. Here the port value is used as a bucket name for the keys. When working with a single port, the data is associated with this port as a keys. When you specify multiple ports, the first value of the array is selected as the default port, and the other ports use the data specified for the default port.

For httplive application running with port 5003:

GET/api/guideline/mobiletoken

this key will be stored in the bucket 5003. Therefor if you running app as single port with 5004 you can not access the keys of 5003 port. You can use multi-port host to overcome this situation.

Docker Build & Run

docker build -t local-httplive .

docker run -it -p 5003:5003 -v httpfs:/src/app local-httplive

Compiling the UI into the Go binary

go get github.com/jteeuwen/go-bindata/...
go-bindata -pkg "lib" -o "./lib/bindata.go" public/...

Todo

Tests

Upload a database file from the web interface.

Watch the video

httplive's People

Contributors

aimof avatar gencebay avatar guneysus avatar tahaipek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

httplive's Issues

Statically link your binary

The current release is dynamically linked against GNU libc so it doesn't work in distros that use a different libc.

Editor Autosave not working

The editor is not autosaving when making changes to the response json. I can create, edit, and delete endpoints. I just can't change the response body.

There are no errors in the console, but there are a couple of warnings.

jsoneditor.min.js:30 Unknown option "enableBasicAutocompletion". This option will be ignored
jsoneditor.min.js:30 Unknown option "savingProgress". This option will be ignored
jsoneditor.min.js:30 Unknown option "enableBasicAutocompletion". This option will be ignored
jsoneditor.min.js:30 Unknown option "savingProgress". This option will be ignored

I can post the full stack trace if needed.

go version go1.9.2 darwin/amd64
httplive version 0.0.1

I'm starting to dig into the code, but just wanted to see if there was anything familiar with this problem.

f.Size undefined error in go get command

hey guys
I'm trying to get httplive but something goes wrong:

$ go get -u github.com/gencebay/httplive
# github.com/gencebay/httplive/lib
../go/src/github.com/gencebay/httplive/lib/utils.go:91: f.Size undefined (type *multipart.FileHeader has no field or method Size)

go get failed.

When I go get github.com/gencebay/httplive, it failed with:

# github.com/gencebay/httplive/lib
go/src/github.com/gencebay/httplive/lib/controller.go:106:13: c.ShouldBindJSON undefined (type 
*gin.Context has no field or method ShouldBindJSON)
go/src/github.com/gencebay/httplive/lib/controller.go:122:13: c.ShouldBindJSON undefined (type 
*gin.Context has no field or method ShouldBindJSON)

How To Save The Endpoint!!!

Hello,
i cant save. i cant see a button to save my JSON. i think icant see now. maybe it is at very visible place :)
image

how to save to see output.

image

Feature request

if there has a feature can group the apis will be wonderful.

image

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.