This is a Next.js project bootstrapped with create-next-app.
Project use pnpm. If you don't have it yet, get pnpm first by running the command below.
npm install -g pnpmInstall dependencies:
pnpm installYou need to set up Mapbox token in your env file to be able to run the application locally. Save your token in .env as NEXT_PUBLIC_MAPBOX_TOKEN.
NEXT_PUBLIC_MAPBOX_TOKEN=YOUR_MAPBOX_TOKENAfter installing dependencies and setting up Mapbox token, run the development server:
pnpm devOpen http://localhost:3000/ with your browser to see the result.
The command below will build the website.
pnpm run build
The command below will build the production version of website, with base path defined.
pnpm run build-prod
Edit src/config/website.ts to change the website title and description:
export const WEBSITE_TITLE = "Proenergia + IEP";
export const WEBSITE_DESC = "Proenergia";Edit NEXT_PUBLIC_BASE_PATH variable in build-prod command that you can find from package.json
...
"build-prod": "NEXT_PUBLIC_BASE_PATH=/app next build --webpack && rm -rf .out-tmp && mv out .out-tmp && mkdir out && mv .out-tmp out/app",
...To learn more about the framework this project is using 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.