{"id":13836865,"url":"https://github.com/augustoroman/go-react-v8-ssr","last_synced_at":"2025-07-10T16:31:09.560Z","repository":{"id":57554739,"uuid":"66507993","full_name":"augustoroman/go-react-v8-ssr","owner":"augustoroman","description":"Golang isomorphic react/hot reloadable/redux/css-modules  starter kit","archived":false,"fork":true,"pushed_at":"2016-08-30T17:55:57.000Z","size":517,"stargazers_count":56,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-05T15:05:22.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"olebedev/go-starter-kit","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/augustoroman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-24T23:52:16.000Z","updated_at":"2023-08-27T17:09:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/augustoroman/go-react-v8-ssr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoroman%2Fgo-react-v8-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoroman%2Fgo-react-v8-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoroman%2Fgo-react-v8-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoroman%2Fgo-react-v8-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augustoroman","download_url":"https://codeload.github.com/augustoroman/go-react-v8-ssr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225647931,"owners_count":17502152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T15:00:55.919Z","updated_at":"2024-11-20T23:31:54.131Z","avatar_url":"https://github.com/augustoroman.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-react-v8-ssr: Work-in-progress\n\nGo server serving a react-based website using server-side rendering powered by V8.\n\n---\n\nThis repo is forked from the awesome [go-starter-kit](https://github.com/olebedev/go-starter-kit).\n\nI forked that project and am modifying to get a better understanding of how it works.  And use some of the tools I'm more familiar with.  There are many changes, but some of the major ones include:\n* rework the JS rendering engine to use either [v8](https://github.com/augustoroman/v8) or [duktape](https://github.com/olebedev/go-duktape)\n  On windows, only duktape is allowed and used by default.\n* simplify the server code to be an easier-to-understand example\n* use [modd](https://github.com/cortesi/modd) instead of [on](https://github.com/olebedev/on) for running the server.\n* use [go-rice](https://github.com/GeertJohan/go.rice) instead of [go-bindata](https://github.com/jteeuwen/go-bindata) for embedding the data.\n* use [govendor](https://github.com/kardianos/govendor) rather than [srlt](https://github.com/olebedev/srlt)\n\n## Installation\n\nMake sure you have:\n* [golang](https://golang.org/)\n* [node.js](https://nodejs.org/) with [npm](https://www.npmjs.com/), only to build the application bundle at compile time.\n  For windows, it's very important that you have a recent npm, otherwise the npm install will fail because the directory paths are too long.\n* [GNU make](https://www.gnu.org/software/make/)\n\n#### Clone the repo\n```bash\n$ git clone git@github.com:augustoroman/go-react-v8-ssr.git $GOPATH/src/github.com/\u003cusername\u003e/\u003cproject\u003e\n$ cd $GOPATH/src/github.com/\u003cusername\u003e/\u003cproject\u003e\n```\n\n#### Install some go-based utilities:\n```bash\n$ go get -u github.com/kardianos/govendor\n$ go get -u github.com/GeertJohan/go.rice/rice\n$ go get -u github.com/cortesi/modd\n```\n\n#### Install dependencies:\n```bash\n$ govendor sync\n$ npm install\n```\n\n#### Build V8\nSee instructions at https://github.com/augustoroman/v8\n\n#### Add v8 symlinks\n```bash\n$ vendor/github.com/augustoroman/v8/symlink.sh \u003cV8-DIR\u003e\n```\n\n## Run development\n\nStart dev server:\n\n```\n$ modd\n```\n\nthat's it. Open [http://localhost:5001/](http://localhost:5001/)(if you use default port) at your browser. Now you ready to start coding your awesome project.\n\n## Build\n\nInstall dependencies and type `NODE_ENV=production make build`. This rule produces the production webpack build and that is embedded into the go server, then builds the server. You can find the result at `./bin/server`.\n\n\n---\n\n## Project structure\n\n##### The server's entry point\n```\n$ tree server\nserver\n├── main.go \u003c-- main function declared here\n├── react-v8.go\n├── bindata.go \u003c-- this file is gitignored, it will appear at compile time\n└── data\n    ├── static\n    |   └── build \u003c-- this dir is populated by webpack automatically\n    └── templates\n        └── react.html\n```\n\nThe `./server/` is flat golang package.\n\n##### The client's entry point\n\nIt's simple React application\n\n```\n$ tree client\nclient\n├── actions.js\n├── components\n│   ├── app\n│   │   ├── favicon.ico\n│   │   ├── index.js\n│   │   └── styles.css\n│   ├── homepage\n│   │   ├── index.js\n│   │   └── styles.css\n│   ├── not-found\n│   │   ├── index.js\n│   │   └── styles.css\n│   └── usage\n│       ├── index.js\n│       └── styles.css\n├── css\n│   ├── funcs.js\n│   ├── global.css\n│   ├── index.js\n│   └── vars.js\n├── index.js \u003c-- main function declared here\n├── reducers.js\n├── router\n│   ├── index.js\n│   ├── routes.js\n│   └── toString.js\n└── store.js\n```\n\nThe client app will be compiled into `server/data/static/build/`.  Then it will be embedded into go package via _go-bindata_. After that the package will be compiled into binary.\n\n**Convention**: javascript app should declare [_main_](https://github.com/augustoroman/go-react-v8-ssr/blob/master/client/index.js#L4) function right in the global namespace. It will used to render the app at the server side.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustoroman%2Fgo-react-v8-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustoroman%2Fgo-react-v8-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustoroman%2Fgo-react-v8-ssr/lists"}