gorest

command module
v0.0.0-...-2e00552 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 13 Imported by: 0

README

GoREST REST Servive documentation

A Simple REST application using golang,docker,mongo

Technology
  • Go 1.11
  • Database
    • MongoDB connection details:
      • host: mongodb
      • port: 27017

Instructions

  1. Clone the repo
go get -d github.com/sarathsp06/gorest
cd $GOAPTH/src/github.com/sarathsp06/gorest
  • Run bash setup.sh to setup the environment,once
    • creates a directory under current diretory to attach as log volume
  • Run bash start.sh to run the service in docker
  • Vist localhost:8080 to see the details of the running instance
  • Refer to the documentation for detail on API
  • Logs are available in "$PWD/logs"
    • access logs in $PWD/logs/access.log
    • application specific logs in $PWD/logs/app.log

NOTE:

  • Run make to see all the possible make commands
  • Run su -c "setenforce 0" , if logs directory is empty
  • If page,pageNum invalid the service would assume default (20,1)
  • I have added google key in config file the account is not paid, change the config in config.json.prod with a valid key to run properly

Available Resources

Name Method URL Protected
About GET /
List GET /orders
Create POST /order
Update PUT/PATCH /order/{id}
TODO

References

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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