Skip to content

tekstrand/weather-10kb

 
 

Repository files navigation

Weather forecast in under 10kb (excluding favicons) without any client side javascript.

Run wxkb.io locally

  1. Install node.js
  • if you have homebrew, brew install node
  1. clone repo via terminal: git clone https://github.com/JulianNorton/weather-10kb.git
  2. cd into the weather-10kb folder: cd weather-10kb
  3. install required packages: npm install
  4. Sign up for a dark sky API key
  5. Turn on local version: DARK_SKY_API_KEY=<key> node index.js
  • Replace <key> with whatever your API key is
  • † Google api key will increase rate limit for the npm package node-geocoder
    • may require google api key, see: JulianNorton#62
    • DARK_SKY_API_KEY=<key> GOOGLE_API_KEY=<key> node index.js to run it locally with the google key
  • Ignore opbeat "isn't correctly configured", that's used only for wxkb.io production logging
  1. go to http://localhost:5000
  • It should show an error when loaded "Error: Unable to determine location based on IP address.", that's normal!
  1. Submit any bugs, questions, or ideas you have!

Modify & Compile CSS

  • styles-compiler.scss compiles into main.css using node-sass
  • npm run watch-css Automatically compiles css whenever there's a change to the .scss
  • npm run build-css If you want to compile css once
  • npm rebuild node-sass if you're switching branches a lot this can fix node-sass crashes.

Please fork, modify, and use this project!

Open source, General Public License v2. Basically do whatever you want with it. Pull requests must keep these tenants in mind:

Accessibility (a11y)

Browser compatibility

Performance

Misc

About

A super fast weather site in under 10kb.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 35.1%
  • JavaScript 32.9%
  • CSS 32.0%