golang-http-mysql-template

所属分类:MySQL数据库
开发工具:GO
文件大小:9KB
下载次数:0
上传日期:2017-12-21 04:23:22
上 传 者sh-1993
说明:  这个例子展示了如何将Anychart库与Go编程语言和MySQL数据库一起使用。
(This example shows how to use Anychart library with the Go programming language and MySQL database.)

文件列表:
LICENSE (11357, 2017-12-21)
database_backup.sql (1002, 2017-12-21)
main.go (1748, 2017-12-21)
public (0, 2017-12-21)
public\static (0, 2017-12-21)
public\static\css (0, 2017-12-21)
public\static\css\style.css (94, 2017-12-21)
templates (0, 2017-12-21)
templates\index.html (910, 2017-12-21)

[AnyChart - Robust JavaScript/HTML5 Chart library for any project](https://www.anychart.com) # Go basic template This example shows how to use Anychart library with the Go programming language and MySQL database. ## Running To use this sample you must have Go installed as described [here](https://golang.org/doc/install), and follow the [official Go code organization](https://golang.org/doc/code.html); MySQL installed and running, if not please check out [MySQL download page](https://dev.mysql.com/downloads/installer/) and follow [these instructions](http://dev.mysql.com/doc/refman/5.7/en/installing.html). To check your installations, run the following command in the command line: ``` $ go version go version go1.7.1 linux/amd*** # sample output $ mysql --version mysql Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (x86_***) using readline 6. # sample output ``` To start this example run commands listed below. Clone the repository from github.com: ``` $ go get github.com/anychart-integrations/golang-http-mysql-template ``` Navigate to the repository folder: ``` cd $GOPATH/src/github.com/anychart-integrations/golang-http-mysql-template ``` Install dependencies: ``` $ go get ./... ``` Compile demo: ``` $ go install github.com/anychart-integrations/golang-http-mysql-template $ go build ``` Set up MySQL database, use -u -p flags to provide username and password: ``` $ mysql < database_backup.sql ``` Run example: ``` $ golang-http-mysql-template ``` Open browser at http://localhost:8080/ ## Workspace Your workspace should look like: ``` $GOPATH/ bin/ pkg/ src/ github.com/ {user}/ golang-http-mysql-template/ public/ static/ css/ style.css # css file templates/ index.html # html template database_backup.sql # MySQL database dump main.go # main Go code README.md ``` ## Technologies Language - [Go](https://golang.org/)
Database - [MySQL](https://www.mysql.com/)
Web framework - [net/http](https://golang.org/pkg/net/http), [html/template](https://golang.org/pkg/html/template/)
## Further Learning * [Documentation](https://docs.anychart.com) * [JavaScript API Reference](https://api.anychart.com) * [Code Playground](https://playground.anychart.com) * [Technical Support](https://www.anychart.com/support) ## License AnyChart Go/MySQL integration sample includes two parts: - Code of the integration sample that allows to use Javascript library (in this case, AnyChart) with Go language and MySQL database. You can use, edit, modify it, use it with other Javascript libraries without any restrictions. It is released under [Apache 2.0 License](https://github.com/anychart-integrations/golang-http-mysql-template/blob/master/LICENSE). - AnyChart JavaScript library. It is released under Commercial license. You can test this plugin with the trial version of AnyChart. Our trial version is not limited by time and doesn't contain any feature limitations. Check details [here](https://www.anychart.com/buy/). If you have any questions regarding licensing - please contact us. [![Analytics](https://ga-beacon.appspot.com/UA-228820-4/Integrations/golang-http-mysql-template?pixel&useReferer)](https://github.com/igrigorik/ga-beacon)

近期下载者

相关文件


收藏者