• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go program with embedded Next.js app.

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 [email protected]: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

More Repositories

1

hetty

An HTTP toolkit for security research.
Go
6,086
star
2

go-notion

Go client for the Notion API.
Go
381
star
3

ct-diag-server

Diagnosis server for Apple/Google's (COVID-19) Exposure Notification framework.
Go
61
star
4

meteor-geospatial-demo

Meteor app with geospatial queries
JavaScript
23
star
5

yii2-json-schema-validator

A Yii 2 validator for JSON Schema.
PHP
17
star
6

vagrant-nginx-gunicorn-django

Configuration for setting up a Vagrant box with nginx, gunicorn and a stub django project.
Ruby
15
star
7

go-bunq

Go wrapper for the public bunq API.
Go
12
star
8

mailcheck

Tool for checking SPF records for domain names
Go
8
star
9

knowitallbot

A question-answering chatbot using the MessageBird Chat API.
JavaScript
8
star
10

v0x.nl

Source code for https://v0x.nl.
MDX
4
star
11

funda-alert

Funda new house alerts on Telegram.
Go
4
star
12

messagebird-graphql-poc

JavaScript
3
star
13

edena

Toolkit for capturing out-of-band data via HTTP, DNS and SMTP.
Go
3
star
14

astro-cv

Astro template for a CV
Astro
2
star
15

corona-melder-keyset-dashboard

JavaScript
2
star
16

ch7465lg

Go library and Prometheus exporter for the Compal CH7465LG cable modem (Ziggo ConnectBox).
Go
2
star
17

go-xstate

XState written in Go.
Go
2
star
18

tonny

A `net.Listener` to "tee" reads/writes on `net.Conn`s.
Go
1
star
19

exp-notif-crypto

Go implementation of the Encryption Specification of Apple/Google's Exposure Notification framework.
Go
1
star
20

ah-delivery-slots-notif

Automated (SMS) notifier for available delivery slots on ah.nl.
Go
1
star
21

drupstrap

Drupal base theme implementing Bootstrap framework
PHP
1
star
22

funda2csv

Go
1
star