Sample app for teaching Alan node.js.
git clone ....
- In the app directory, run
npm install
to install the required modules. - Copy the
.env.sample
file to a.env
file. Add your Forecast.io API Key. - In the terminal, run
npm start
to start the app. Alternatively, to get automatic app refresh on save, runnode-dev index.js
.
Adddotenv
node module and move the API Key into the .env file (don't forget togitignore
it!).Update the app to use a templating engine such as EJS or handlebars.Move the API call to a separate file.- Explore Async.js callbacks vs. promises.
- Add tests!
- Create a routes file that gets called from index.js.
- Update the app to respond to a user-provided location.