Skip to content

Latest commit

 

History

History

nextjs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Run Next.js (Client) on Go Server

Build a client-side Next.js web application and deploy it to a Go server.

Setup

  1. Run the application.

    cd web
    npm install
    npm run dev
  2. Build and export the application.

    cd web
    npm run build
  3. Build the go server.

    mkdir bin
    go build -o bin/server main.go
    cd bin
    ./server

    Alternatively, just run make run.

  4. Navigate to http://localhost:8000.

Reference