/exercises

Programming Exercises

Primary LanguageJavaScript

Programming Exercises

1. Title casing

The solution index.html can be found in folder Ex1.

2. API Calls

The solution index.html can be found in folder Ex2.

Please download Ex2 folder and put your Dark Sky API key into API_KEY in main.js (line 2).

3. SOAP

The solution can be found in folder Ex3.

To run, please download Ex3 folder. Open a terminal window in that folder and run the following commands to install npm dependencies and then run the app:

npm i
npm start

For detailed logging (displaying both SOAP requests and responses) use command:

npm run detail

4. XPath, XSLT

The required XPath is:

//channel/lastBuildDate

The required XSLT transformation index.xslt can be found in folder Ex4.

5. Express REST API

The solution can be found in folder Ex5.

To run, please download Ex5 folder. Open a terminal window in that folder and run the following commands to install npm dependencies and then run the app:

npm i
npm start

The REST API will be available at http://localhost:4000/.

The port used by the server can be changed in .env file.