Skip to content

Latest commit

 

History

History
executable file
·
47 lines (41 loc) · 2.74 KB

README.md

File metadata and controls

executable file
·
47 lines (41 loc) · 2.74 KB

 

   MyNSB API

Travis Code Climate Code Climate license GitHub release GitHub contributors

Setup

The repository includes a simple installation script located here.

  • Installation Instructions
       foo@bar:~$ git clone https://github.com/MyNSB/API.git mynsb-api
       foo@bar:~$ cd mynsb-api/scripts/local
       foo@bar:~/mynsb-api/scripts/local$ sudo sh setup.sh
    • Configuration
      • If you PostgreSQL installation is running on a port that is not the default: 5432 or if your PostgreSQL installation is not local, you may want to configure the database details file located here

Development

All files are located in the internal folder.

  • IDE setup
    • The recommended IDE for development is JetBrain's Goland, configuration files for this IDE can be found at: development/IDE/.idea.
    • We also recommend that you install the govendor tool found: here in order to properly manage project dependencies
  • Testing
    • Due to the nature of the application it is recommended that you use a simple API client such as Postman in order to test your code.
  • Contributing
    • Fork and make a pull request :)

Usage

  • If the API has been added to your GOPATH and GOBIN has been added to your PATH variable then execution of the API is as follows:
      foo@bar:~$ go install mynsb-api
      foo@bar:~$ mynsb-api
  • This will start a local testing server on port 8080
  • If you are unable to install the API this way then a simple compilation of the source code will work too.
      foo@bar:~$ go build $GOPATH/src/mynsb-api/main.go

Remote Usage

  • A remote version of the API may be found at: https://mynsb.visions.com/api/v1
  • Documentation regarding the general usage of the API can be found at the WIKI section of this repository