All Projects → SocialGouv → sample-next-app

SocialGouv / sample-next-app

Licence: other
Sample Next.js app with basic tooling

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
PLpgSQL
1095 projects
Gherkin
971 projects
Dockerfile
14818 projects
shell
77523 projects

sample next.js app

https://sample-next-app.fabrique.social.gouv.Fr

A sample SSR Next.js app with :

Development

Start hasura and local postgres using

docker-compose up

Hasura migrations and metadata will be automatically applied.

to launch the Hasura console, you can run the command

hasura console --envfile ../.env --project hasura

And then launch the frontend (next.js app) using

yarn dev

Production

Env vars

You need to set client-side browser process.env variables at build time.

In docker this is done with --build-arg.

Var desc
PORT port to run the server on
NEXT_PUBLIC_SENTRY_DSN DSN of your sentry project
SENTRY_TOKEN token to allow sourcemaps
NEXT_PUBLIC_MATOMO_URL URL to your matomo instance
NEXT_PUBLIC_MATOMO_SITE_ID site id on matomo instance

Docker build

docker build . -t sample-next-app

Docker run

docker run -it --init --rm -p 3000:3000 sample-next-app

Tips

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].