Discover Packages
github.com/syntaxerror2015/apigo
module
Version:
v0.0.0-...-e341e2a
Opens a new window with list of versions in this module.
Published: Apr 5, 2015
License: MIT
Opens a new window with license information.
README
README
¶
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
Install Go and set up your GOPATH
Install MongoDb
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" } ] } )
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 ./...
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
Expand ▾
Collapse ▴
Directories
¶
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
Click to show internal directories.
Click to hide internal directories.