8000 GitHub - jinganix/guess: 猜猜谜题微信小程序源码 - The source code of the 'Guess the Riddle' Wechat miniprogram · GitHub
[go: up one dir, main page]

Skip to content
jinganixPublic

About

猜猜谜题微信小程序源码 - The source code of the 'Guess the Riddle' Wechat miniprogram

Topics

Resources

Contributing

Stars

72 stars

Watchers

1 watching

Forks

Repository files navigation

CI License

English Version

猜猜谜题

本仓库是《猜猜谜题》微信小程序的源码,你可以扫码体验此小程序

  • 前端使用Typescript开发,用webpack构建打包
  • 后端使用Java和Spring框架开发,用gradle构建打包

速览:架构为 frontend/weapp(小程序前端)+ service(Java 后端);后端跑 ./gradlew service:bootRun,小程序跑 cd frontend/weapp && npm install && npm start(工具导入 frontend/weapp/dist);小程序码见扫码体验(docs/qrcode.jpg),详情见运行项目。

运行项目

你需要先拉取项目源码并切换到项目根目录

git clone git@github.com:jinganix/guess.git
cd guess

后端

通过docker-compose运行

复制application-local.yml.example为同目录下的application-local.yml再填真实值(该文件不入库;生产用环境变量覆盖)

  • core.weapp.app-id: 微信小程序的app-id
  • core.weapp.app-secret: 微信小程序的app-secret

如果你已经安装docker和docker-compose,可以通过以下命令启动后端服务

./gradlew build
docker-compose up --build

通过gradle运行

你需要安装jdk,对应的版本在.tool-versions,并启动mysql数据库

同样复制application-local.yml.example为application-local.yml再填以下配置(或直接设同名环境变量)

  • core.weapp.app-id: 微信小程序的app-id
  • core.weapp.app-secret: 微信小程序的app-secret
  • core.url.db-mysql: mysql数据库连接地址,如jdbc:mysql://127.0.0.1:3306/guess
  • spring.datasource.username: 数据库用户名
  • spring.datasource.password: 数据库密码

以下命令可以在Linux或MacOS系统中启动后端服务

./gradlew service:bootRun

以下命令可以在Windows系统中启动后端服务

./gradlew.bat service:bootRun

前端

你需要安装node.js,对应的版本在.tool-versions

运行命令

git clone git@github.com:jinganix/guess.git
cd guess/frontend/weapp
npm install
npm start

开发者工具设置

  1. 开发者工具导入项目的dist目录:guess/frontend/weapp/dist

  2. 关闭域名校验

    Image

扫码体验

Image

贡献

如果你有兴趣报告/修复问题并直接为代码库做出贡献,请查看 CONTRIBUTING.md 获取更多信息,了解我们期望的贡献内容以及如何开始

About

猜猜谜题微信小程序源码 - The source code of the 'Guess the Riddle' Wechat miniprogram

Topics

Resources

Contributing

Stars

72 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0