POC of a Next.js project that uses Golang written code using node-gyp on the server and WASM on the client
Tool | Version |
---|---|
yarn |
>1.22 |
node |
>12 |
go |
=1.16 |
tinygo |
=0.17 |
Install dependencies:
$ yarn
Compile add.wasm and add.node packages:
$ yarn compile
You can run unit tests to see if everything compiled fine:
$ yarn test:unit
Build the Next.js application:
$ yarn build
Start production version of the application:
$ yarn start
Finally, run e2e tests, or check the http://localhost:3000 yourself:
$ yarn test:e2e