English | Español
Next.js with a Service Worker and a GraphQL (with Apollo) API that communicates to a Prisma database, all uploaded to Now.
You'll need Node AND Yarn installed (plus Now CLI and Prisma CLI).
# Install Now and Prisma
$ yarn global add now prisma
$ now login
$ prisma login
$ cd pasetec/web
$ yarn install
web/
|-- prisma/
|-- public/
|-- src/
|-- components/
|-- pages/
|-- api/
|-- graphql/
|-- utils/
|-- .env
|-- next.config.js
|-- now.json
api/
: Each API endpoint (Mirco)graphql/
: Apollo Serverpages/
: Every Next.js pageprisma/
: Prisma datamodel and JavaScript clientpublic/
: Public files of Next.js.env
: There go the env vars. Follow.env.example
to create itnext.config.js
: Next.js configurationnow.json
: Now configuration. Make sure to replace the secrets!
Run $ yarn dev
. It will run a Next.js local server.
Run $ now --prod
. More info about it here.