GithubHelp home page GithubHelp logo

golang_web's Introduction

golang_web

golang简单web服务器(登录小例子),效果预览:

![golang_web](http://kiritor.github.io/img/golang_web.gif) ##目录结构 bin--gobuild生成的执行程序目录
/template --静态文件(和执行程序同级)

src--源代码

/golang_web --包

template--静态文件(编译之后,将其置于执行程序所在的目录下)

sql--sql建表语句

##运行 1、搭建go环境,代码复制到gopath中(可以多个gopath)

2、安装go语言mysql驱动,mymysql

3、创建mysql数据库

4、修改ajaxController.go代码中数据库设置的参数

5、编译go build golang_web

6、将生成的执行文件置于template的父级目录运行服务(或者将template置于可执行文件目录)

7、输入localhost:8888/ 访问

golang_web's People

Contributors

kiritor avatar

Watchers

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