Giter VIP home page Giter VIP logo

api-server's Introduction

TUTORIAL OF USEING THIS DEMO SERVER

1.Assume you have an Unix-like system . And You have intall the Postgresql and the Go language envirment

2.workplace direcory instructions:

bin/
   start.sh             # it is used to start the server  usage : enter the project directory excute: bin/start.sh
                         
etc/
    config.json         # it contains the db configuration and so on . before start the server you should change the config match your environment
src/
    handler/            # the url handler
        relation.go     # deal with the relation request 
        user.go         # deal with the user info request
    model/              # db table model
        model_types.go  # define some data type
        db_init.go      # db init
        relationships.go# table relationships model
        user.go         # table users model
    util/
        config.go       # config init from the json type file 
        log.go          # log util
    main.go             #
log/                    # when the server start user request will genarate the log file : info.log err.log warn.log
                        # the files represent diffent level log
vendor/                 # third party package directory

3.use postgresql client to connect pg server then execute the bin/install.sql content

4.configurate your pg server ip, port, username and password.

4.Start the server :

  • clone the project to your GOPATH (asumme you have install golang envirment)
  • execute : bin/start.sh(your local machine 8080 port is avaliable to use)
  • use tool to request the server

TODO

  • circuit breaker

api-server's People

Watchers

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