Skip to content

frankmeza/golang-nextjs-portable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-nextjs-portable

golang-nextjs-portable is a small Go program to showcase the embed package for bundling a static HTML export of a Next.js app.

👉 Read the companion article that walks through this project.

Requirements

  • Go 1.16
  • Yarn

Installing

Clone or download the repository:

$ git clone git@github.com:dstotijn/golang-nextjs-portable.git

Usage

From the repository root directory, generate the static HTML export of the Next.js app, and build the Go binary:

$ cd nextjs
$ yarn install
$ yarn run export
$ cd ..
$ go build main.go

Then run the binary:

$ ./golang-nextjs-portable

2021/04/27 14:55:38 Starting HTTP server at http://localhost:8080 ...

License

MIT


© 2021 David Stotijn — Twitter, Email, Homepage

About

Go program with embedded Next.js app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 32.8%
  • TypeScript 32.3%
  • Dockerfile 18.1%
  • JavaScript 11.9%
  • Makefile 4.9%