react.js做小程序
介绍 (Introduction)
The purpose of this article is to demonstrate how you can serve your React.js Single Page Application (SPA) with a Go server and combine the entire application into a single binary file, able to run in any operating system.
本文的目的是演示如何使用Go服务器为React.js单页应用程序(SPA)提供服务,以及如何将整个应用程序组合为一个可以在任何操作系统上运行的二进制文件。
先决条件 (Prerequisites)
For this tutorial you will need:
对于本教程,您将需要:
Go environment (instructions)
进入环境( 说明 )
Node.js environment (instructions)
Node.js环境( 说明 )
Go package go.rice (
$ go get github.com/GeertJohan/go.rice
)Go包go.rice (
$ go get github.com/GeertJohan/go.rice
)Create-react-app tool (
$ npm i