Giter VIP home page Giter VIP logo

core-starter's Introduction

CoreStarter

DoNewsCode/core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go. This is a starter template using the DoNewsCode/core framework.

Go Report Card Core Release

Usage

  • 0x01: Generate

You can use the fx command to quickly create a project.

fx create helloworld

Or

When you use Git to generate a project, you need to modify the package name of the project yourself.

git clone https://github.com/DoNewsCode/core-starter.git helloworld
  • 0x02: Config

When you use go run main.go to run the project, the starter uses config.yaml by default. You can use the --config parameter to specify the config file, or use the following command to generate:

cp config.example.yaml config.yaml

When you add other modules, you can use the go run main.go config init -o config.example.yaml re-build the sample config file.

  • 0x03: Happy to coding.

You will see the following directory structure.

├── app
│   ├── commands
│   │   └── example.go
│   └── module.go               # App module
├── docs
│   ├── docsify                 # Docsify: {hostname:port}/docs/docsify
│   ├── swagger                 # Swagger Api: {hostname:port}/docs/swagger
│   └── module.go               # Docs module
├── internal
│   └── bootstrap
│       ├── bootstrap.go
│       ├── bootstrap_test.go
│       ├── root.go
│       ├── option.go
│       └── register.go         # Register global module or dependency
├── .gitignore
├── config.example.yaml         # config example file
├── config.yaml                 # config file
├── go.mod
├── go.sum
├── main.go
└── readme.md

Examples of using other frameworks

Gin

Go Kit

Kratos

core-starter's People

Contributors

nfangxu avatar reasno avatar renovate-bot avatar renovate[bot] avatar

Watchers

 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.