This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

generator-ibm-core-golang-gin

1.0.4 • Public • Published

IBM Core Golang Gin Generator

IBM Cloud powered Travis Coveralls Version DownloadsMonthly DownloadsTotal License

Overview

This generator produces a simple Gin-based Golang server application, with all the ingredients you need for a good start at building a cloud native application. It can be run locally or remotely (e.g. IBM Cloud).

Pre-requisites

npm install -g yo
  • If you don't have it already, download Go
  • Set up a GOPATH

Installation

npm install -g generator-ibm-core-golang-gin

Usage

yo ibm-core-golang-gin

This will create an application in your $GOPATH/src/<application-name> directory.

Following command line arguments are supported:

  • --bluemix='{"name":"<application-name>","backendPlatform":"GO"}'.
  • --bluemix='{"name":"<application-name>"' --spec='{"applicationType":"<application-type>"}'.
  • The three valid application types are: WEBAPP, MS, and BLANK
  • You can alternatively supply a local file containing compatible JSON object by using --bluemix file:path/to/file.json
  • If you specifiy the bluemix argument, your application will be generated in your current working directory.

Artifacts

Here is a list of the files and folders you receive after executing the generator:

File Purpose
README.md Instructions for building, running, and deploying the application
Gopkg.toml Toml file containing application dependencies used for dep
public/* Folder containing files for server landing page
run-dev Simple shell script to run application in dev mode
server.go Contains server configuration
routers/* Folder containing router configuartion files

Development

Clone this repository and link it via npm

git clone https://github.com/ibm-developer/generator-ibm-core-golang-gin.git
cd generator-ibm-core-golang-gin
npm link

In a separate directory invoke the generator via

yo ibm-core-golang-gin

Testing

To run the unit tests

npm test

Publishing Changes

In order to publish changes, you will need to fork the repository or branch off the master branch.

Make sure to follow the conventional commit specification before contributing. To help you with commit a commit template is provide. Run config.sh to initialize the commit template to your .git/config or use commitizen

Once you are finished with your changes, run npm test to make sure all tests pass.

Do a pull request against develop and make sure the build passes. A team member will review and merge your pull request. Once merged to develop a team member will merge to master and a pull request will be created against master to update the version. After the autogenerated pull request has been merged to master the version will be bumped and published to npm.

Readme

Keywords

Package Sidebar

Install

npm i generator-ibm-core-golang-gin

Weekly Downloads

3

Version

1.0.4

License

Apache-2.0

Unpacked Size

4.06 MB

Total Files

72

Last publish

Collaborators

  • ibm-cloud-tools-owner