Skip to content
The API for MyNSB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_WIP
_daemons
assets
cmd
database
development/IDE/.idea
internal
scripts
static
tests
vendor
.codeclimate.yml
.gitattributes
.gitignore
.travis.yml
Caddyfile
LICENSE
README.md
TODO.md
main
main.go
test
test.go

README.md

 

   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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.