Giter Site home page Giter Site logo

joseph-hurtado / go-bootstrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from go-bootstrap/go-bootstrap

0.0 1.0 0.0 408 KB

Generates a lean and mean Go web project.

Home Page: http://go-bootstrap.io

License: MIT License

Go 89.51% Ruby 4.45% Shell 5.92% CSS 0.12%

go-bootstrap's Introduction

GoDoc license

go-bootstrap

This is not a web framework. It generates a skeleton web project for you to kick-ass.

Feel free to use or rip-out any of its parts.

NOTE: Due to lack of Windows machine, at the moment, PostgreSQL template is not working on Windows.

Prerequisites

  1. PostgreSQL or MySQL if you choose to use a database.

  2. Go programming language, version 1.3.x or newer.

  3. Ensure $GOPATH/bin is in your $PATH. Example: PATH=$PATH:$GOPATH/bin

Installation

  1. go get github.com/go-bootstrap/go-bootstrap

  2. $GOPATH/bin/go-bootstrap -dir github.com/{git-user}/{project-name}

  3. Start using it: cd $GOPATH/src/github.com/{git-user}/{project-name} && go run main.go

PostgreSQL Environment Variables

If you have PGUSER, PGPASSWORD, PGHOST, PGPORT, PGSSLMODE environment variables set, they will be used to generate and bootstrap the database.

Decisions Made for You

This generator makes A LOT of decisions for you. Here's the list of things it uses for your project:

  1. There are 3 templates to choose from:

    • Core: If you don't want a database.

    • PostgreSQL.

    • MySQL.

  2. bcrypt is chosen as the password hasher.

  3. Bootstrap Flatly is chosen for the UI theme.

  4. Session is stored inside encrypted cookie.

  5. Static directory is located under /static.

  6. Model directory is located under /models.

  7. It does not use a full blown ORM.

  8. Test database is automatically created under $GO_BOOTSTRAP_PROJECT_NAME-test.

  9. A minimal Dockerfile is provided.

  10. A minimal Vagrantfile is provided.

  11. github.com/jmoiron/sqlx is chosen to connect to a database.

  12. github.com/gorilla is chosen for a lot of the HTTP plumbings.

  13. github.com/carbocation/interpose is chosen as the middleware library.

  14. github.com/tylerb/graceful is chosen to enable graceful shutdown.

  15. github.com/rnubel/pgmgr is chosen as the database migration and management tool for PostgreSQL.

  16. github.com/mattes/migrate is chosen as the database migration and management tool for MySQL.

  17. github.com/Sirupsen/logrus is chosen as the logging library.

  18. github.com/spf13/viper is chosen to manage application config.

go-bootstrap's People

Contributors

didip avatar relistan avatar aevernon avatar luebken avatar stroborobo avatar blachniet avatar cgag avatar gmas avatar lukasz-madon avatar sbrosinski avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.