Giter Site home page Giter Site logo

weapp-mrszhangprivatekitchen-backend's Introduction

小张私厨后端服务

项目介绍

小张私厨是送给女朋友的生日礼物,为后端源代码。 项目使用 golang gin 框架开发,用简易的jwt做登录授权。

功能说明

快速开始

本操作在macos 、 linux 下生效,需要golang 1.11+ 编译环境。

git clone [email protected]:54853315/weapp-MrsZhangPrivateKitchen-Backend.git
export GOPROXY=https://goproxy.cn
export GO111MODULE=on

依赖包说明

本开源程序使用go MOD管理依赖包,方便易用,脱离$GOPATH噩梦。

软链到$GOPATH/src(不建议)

如果想把这个项目放到GOPATH下面,不使用go mod模式的话,只需要把这个项目移到GOPATH环境变量包含的任意一个目录下面的src目录里,就可以启用GOPATH模式了。

前提是 GOMODULE 环境变量的值必须是auto 或 off

cd weapp-MrsZhangPrivateKitchen-Backend
ln -s $(PWD) ~/go/src/

运行方式

可以直接用go run 启动程序,也可以使用热编译realize命令启动。

go run

go run mian.go

realize

.realize.yaml 中的schema.path为项目当前路径后:

realize start

cd weapp-MrsZhangPrivateKitchen-Backend
go run main.go 

使用Docker运行

准备了docker-compose和Dockerfile(方便自动化构建),容器外部访问端口为8881

cd weapp-MrsZhangPrivateKitchen-Backend
docker-compose up -d
curl localhost:8881/api/books/

数据移值

建议使用Mysql5.7+

# 执行 sql 语句
mysql> source ./scripts/init.sql;

访问

http://localhost:8080/api/books/

演示 Demo

由于个人无法发布具有社交含义的小程序,在我完成了这套小程序后翻车了QAQ。所以没有演示demo……

贡献代码

非常欢迎优秀的开发者来贡献。在提Pull Request之前,请首先阅读源码,了解原理和架构。

weapp-mrszhangprivatekitchen-backend's People

Contributors

54853315 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

lrj567

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.