MCPcopy Index your code
hub / github.com/dstotijn/golang-nextjs-portable

github.com/dstotijn/golang-nextjs-portable @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
7 symbols 14 edges 6 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.18
  • Yarn

Note: While the embed package was added in Go 1.16, the all: prefix of the embed directive was added in 1.18. We use all: in this project because Next.js static exports contain files and direcories with underscore prefixes.

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 .

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

Core symbols most depended-on inside this repo

main
called by 0
main.go
handleAPI
called by 0
main.go
rewrites
called by 0
nextjs/next.config.js
fetcher
called by 0
nextjs/pages/index.tsx
Index
called by 0
nextjs/pages/index.tsx
Foo
called by 0
nextjs/pages/foo/index.tsx
Bar
called by 0
nextjs/pages/foo/bar.tsx

Shape

Function 7

Languages

TypeScript71%
Go29%

Modules by API surface

nextjs/pages/index.tsx2 symbols
main.go2 symbols
nextjs/pages/foo/index.tsx1 symbols
nextjs/pages/foo/bar.tsx1 symbols
nextjs/next.config.js1 symbols

For agents

$ claude mcp add golang-nextjs-portable \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact