Golang学习实战笔记-基础 > 实现一个在线调查问卷系统
源代码


const path = require('path');
 
module.exports = {
    entry:'./index.js',
    output:{
        filename:'bundle.js',
        path:path.resolve(__dirname,'dist')
    },
    module:{
        rules:[{
            test:/\.css$/,
            use:['style-loader','css-loader']
        },{
            test:/\.(svg|woff|woff2|eot|ttf)$/,
            use:['url-loader']
        }]
    }  
}
package main

import (
   "github.com/gw123/question/webApp"
   "fmt"
   "github.com/gw123/question/router"
)

func main() {
   err := webApp.InitConfig()
   if err != nil {
      fmt.Println(err)
      return
   }
   err = router.InitRouter()
   if err != nil {
      fmt.Println(err)
      return
   }
   webApp.StartServer()
}