Getting Started
Requirements
mug riffs off nerdguru's go-sls-crudl combining the Dynamo DB Golang samples and the Serverless Framework Go example. In order to be able to deploy the generated code please make sure to have the following in place/ installed:
- AWS Account (duh!)
- golang (double duh!)
- serverless framework
- dep (golang dependancy management tool)
- aws-cli wouldn't hurt, but is not necessarily required
- aws-sam-cli in case you want to locally debug your code
Installation
To get mug just run
go get github.com/crolly/mug
1
This will create the cobra executable under your $GOPATH/bin
directory. Make sure to have that path in your $PATH
configuration.
Create a Project
The create command generates the boilerplate for project.
mug create projectname [flags]
1
This will create the directory in case it doesn't already exist. In case you want to overwrite any existing directory, you can add the -f
flag to forcefully overwrite.
The structure will generally look like this:
mug.config.json
holds the project's configuration required for mug to work.
Do not change the mug.config.json
file, as it may break your project.
Gopkg.toml
initializes the project with dependency management through dep