Git Product home page Git Product logo

go-backend-starter's Introduction

go-backend-starter

基于gin、gorm的RESTFUL风格的后端框架,使用dep作为项目的包管理器

简体中文 | English

安装golang

Mac下,安装golang,使用以下命令便可以安装

brew install go

配置环境变量

执行以下命令打开配置文件

vim ~/.bash_profile

添加如下代码

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN

然后执行以下代码使改动生效

source ~/.bash_profile

构建本地工作区

mkdir $HOME/go

在上面的go目录下,新建三个目录,分别是bin、pkg、src。bin是存放编译之后的可执行文件的,pkg存放第三方包,src存放项目源代码。

你的项目应该放在$HOME/go/src下。

IDE

建议使用JetBrains的 GoLand,在Preferences中设置项目的GOPATH为$HOME/go。

安装包管理器

brew install dep

clone项目

git clone [email protected]:detectiveHLH/go-backend-starter.git

安装依赖包

dep ensure

启动项目

cd $HOME/go/src/go-backend-starter && go run main.go

go-backend-starter's People

Contributors

detectivehlh 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.