Giter Site home page Giter Site logo

influxdburl's Introduction

influxdbUrl

This is a helper project to let frontend code connect to backend influxdb databse. By default, this service is bind to port 18080

follow the instructions here to install go on your environment: https://golang.org/doc/install

build all go file in influxdbUrl project

go install influxdbUrl/

Copy and paste the result generated from encryptionGenerator project to credential.config, in the following format:

u=${YOUR_ENCRYPTED_USERNAME}
p=${YOUR_ENCRYPTED_PASSWORD}
l=${YOUR_ENCRYPTED_URL}
d=${YOUR_ENCRYPTED_DATABASE_NAME}

Use the following command to start the backend service

go run influxdbUrl/influxDBUrl.go

Note: because this program use current working path for config file, it can only work correctly using the above relative path. Do not run it from a different path

http syntax:

curl -H "Content-Type: application/json" -X POST -d "{\"timeStart\": \"2015-11-03\",\"timeEnd\": \"2018-11-04\",\"limit\": 1000,\"metric\": \"uptime_ms_cumulative\" }"  -i  http://localhost:18080/influxdbUrl

On the server side, it will print the logs of sql command constructed. On the client side, it will print out the http response, it there are any.

After the above config, the last step is to change the file permmision of credential.config to read only

chmod 444 credential.config

To make the program run as backend jobs

nohup $GOPATH/bin/influxdbUrl &

influxdburl's People

Contributors

longtu avatar

Watchers

 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.