This repository contains an express server.
Use npm start
command to start it - server will listen for requests on port 3000
.
There is already one GET
endpoint on http://localhost:3000
which returns Hello, World!
text.
Your task is to add three new endpoints.
When you are done, you can either send a pull request to this repository with your solution or email your solution to HR manager.
You will then receive a detailed review of your code.
Good luck!
Endpoint must return a text of the current price of BTC in EUR.
- Method:
GET
- Endpoint:
http://localhost:3000/btc
- Example of what should be returned:
Price of BTC is 7625.5577 EUR
- Suggested modules to use:
Price must not be hard-coded - it can be taken from some resource which publishes pricing in real time - for example, this.
Endpoint must return a capital of the provided country.
- Method:
GET
- Endpoint:
http://localhost:3000/capital
- Query parameters:
country
- Example of request and what should be returned:
GET
http://localhost:3000/capital?country=latvia
- Returned text:
Capital of Latvia is Riga
- Suggested modules to use:
Endpoint must return a SUM of the column A
inside posted .xlsx
file.