This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
⭐ Set up the Weather 10kb environment
Julian Norton edited this page Dec 3, 2018
·
3 revisions
- Set up your development environment
- Sign up for a couple API keys, which will provide weather and location data.
- Run it locally
- If you're interested in hosting weather-10kb on your website, please see deploying.
-
Install node.js
- if you have homebrew,
brew install node
- if you have homebrew,
- 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
oryarn
- Sign up for a dark sky API key
- Turn on local version:
DARK_SKY_API_KEY=<key> npm start
†- Replace
<key>
with whatever your API key is - † Google api key will increase rate limit for the npm package
node-geocoder
see: https://github.com/JulianNorton/weather-10kb/issues/62 if you have issues. -
DARK_SKY_API_KEY=<key> GOOGLE_API_KEY=<key> npm start
(oryarn start
) to run it locally with the google key
- Replace
- 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-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.
If you get stuck, let us know so we can help!