Note _document.js vs. _app.js -- What is the difference?
_app.js
: Core of the application, everything is assembled from here at runtime._document.js
: Where side effects are possible.components
: Contains the reusable layouts of the application.context
: Encapsulates a global state that can be accessed from anywhere in the application.hooks
: Encapsulates small pieces of code that represent a certain type of logic.lib
: Chaos property, stores here functionalities that do not have to do with the rest of the mentioned sections.pages/api
: Endpoints for creating an api rest.pages
: pages accessible from the browser via.../page
public
: Static content.styles
: Contains the styles of the application. Override or new styles intailwind.config.js
.nginx
: Contains the nginx server configuration.
Warning This version does not include
nginx
redirectión.
Server will be available in:localhost:3000
npm run dev
Warning This version does not include
nginx
redirectión.
Server will be available in:localhost:3000
npm run build
npm run start
Note This version includes
nginx
redirectión.
Server will be available in:localhost:80
docker-compose up -d
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository