book

command
v0.0.0-...-201b726 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 11 Imported by: 0

README

book

基于gin的一个简单的URL。 读取Sqlite数据库表的内容,返回JSON到请求端。

运行编译出来的exe文件即可启动,端口为9012

数据库

同目录下的book.db里的表是 book(书籍)

书籍表字段
逻辑名 物理名
书籍ID book_id
书籍名 book_name
出版日期 publish_date

book_id是 0 - 99

URL:

URL 描述
http://localhost:9012/ping 测试用,页面打印 pong
http://localhost:9012/books 查询所有书籍
http://localhost:9012/book/1 1为book_id, 能查询到数据的范围是 0 - 99

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL