Weather forecast in under 10kb (excluding favicons) without any client side javascript.
- if you have homebrew,
brew install node
- clone repo via terminal:
git clone https://github.com/JulianNorton/weather-10kb.git
- cd into the weather-10kb folder:
cd weather-10kb
- install required packages:
npm install
- Sign up for a dark sky API key
- 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
- go to http://localhost:5000
- It should show an error when loaded "Error: Unable to determine location based on IP address.", that's normal!
styles-compiler.scss
compiles intomain.css
using node-sassnpm run watch-css
Automatically compiles css whenever there's a change to the.scss
npm run build-css
If you want to compile css oncenpm rebuild node-sass
if you're switching branches a lot this can fix node-sass crashes.
Open source, General Public License v2. Basically do whatever you want with it. Pull requests must keep these tenants in mind:
- EJS template tutorial
- Sublime text syntax package for
.ejs
files - Use EditorConfig to maintain a consistent coding style between contributors. See EditorConfig plugins.