corn

command module
v0.0.0-...-6d5ccd8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

corn

This is used to generate a project with the followings:

Prerequisites

  • PostgreSQL database (MySQL will be added later)
  • Go programming language, version 1.3.x or newer with go mod
  • Ensure $GOPATH/bin is in your $PATH. Example: PATH=$PATH:$GOPATH/bin

Installation

  • go get github.com/jameshuynh/corn

Usage

1. Create a new app

corn new <project_name> --database=postgresql

After that you can run this project by executing:

go run main.go

And visit http://localhost:3000

2. Create database

corn db:create

3. Drop database

corn db:drop

4. Generate a new model

corn g model post title description:text

5. Generate a blank new migration file

corn g migration create_cars

6. Run migration

corn db:migrate

7. Rollback a migration

corn db:rollback

Documentation

Overview

Copyright © 2019 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
templates

Jump to

Keyboard shortcuts

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