apigo

module
v0.0.0-...-e341e2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2015 License: MIT

README

wercker status

apiGO

This is a Mock Web Service for iTEC 2015

This API will be build using the Go programming language.

Configuration steps for the API

  1. Install Go and set up your GOPATH

  2. Install MongoDb

  3. Create a database named apiGO_db and then create an user for the database using the following command in mongodb shell:

###db.createUser( { user: "apiGOAdmin", pwd: "apiGOPass", roles: [ { role: "readWrite", db: "apiGO_db" } ] } )

  1. Install all the project dependencies by navigating to the project directory ($GOPATH/src/apiGO) and using the following command in the cmd/console/terminal:

###go get -t ./...

  1. For testing purposes, create another database named apiGO_db_test, but don't create a user for it like for the main database. In order for the tests to run, you need to set the following environment variables correctly:

APIGO_TESTDB_NAME = apiGO_db_test

APIGO_TESTDB_CONN = mongodb://localhost:27017/apiGO_db_test

If you don't want to use the terminal for creating the databases, you can always use an useful app with GUI, such as Robomongo

Directories

Path Synopsis
Package containing the actual API functionality
Package containing the actual API functionality
Package used for application configuration
Package used for application configuration
Package which contains all the services necessary for interacting with all the collections(tables) in the database.
Package which contains all the services necessary for interacting with all the collections(tables) in the database.
Package for keeping test configurations
Package for keeping test configurations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL