Do the following and you are good to go:
# be a cool kid and install with yarn
yarn
# playing around?
yarn dev
# wanna build and start? I got you.
yarn go
This project uses next-offline for the service worker stuff to cache assets. Styled-components are setup out of the box, otherwise just delete the .babelrc and anything you see related to it.
Also, this shows usage with the apimaze API, specifically for getting Batman info. Notice links in index.js are prefetched for offline usage ✨
# healthcheck route added for those who need it for prod systems.
# GET
BASE_URL/healthcheck
- The order of the Koa scripts is important when serving static files.
- If you're using the server.js file for serving your site running
next start
will ignore that - this took me a while to figure out. - If you want to use nextjs to add APIs, make sure that your Koa
ctx.respond = true
otherwise you won't get a response.