A weather forecast app using the OpenWeather API.
Developed for The Odin Project's curriculum.
- node >= 16.9
npm installBuilds the app for production to the dist folder.
npm run buildRuns the app in development mode. Open http://localhost:5173/ to view it in the browser.
npm run devLocally preview the production build. Open http://localhost:3000/ to view it in the browser.
npm run previewRun eslint to report linting errors.
npm run lintDeployed to Cloudflare Pages.
Connect to Gitin Cloudflare Dashboard > Workers & Pages > Pages.- Pick your
Githosting service. ex.GitHub/Gitlab. - Select your repository.
- Pick your
Project name. - Select the corresponding
Framework presetin the build setting. - Add
Build commandex.npm run build. - Add
Build output directoryex.dist. - Add
Environment variablesfrom.env.example. - Deploy site.
- Setup a Custom domain in Custom domains.
More on deployment to Cloudflare Pages...
Deploys are triggered on push or pull_request merge to master branch.
- Using asynchronous React with async/await.
- Using a Public API (OpenWeatherAPI).
- Handling loading and errors states.
- Using environment variables in React.
- Using CSS Modules with SASS.
- Deploying to Netlify.
- Migrating from CRA to Vite.
- Migrating from Netlify to Cloudflare Pages.
- Deploying to Cloudflare Pages.
👤 Juan Carlos Lucio
- Github: @JCarlosLucio
