This README file describe the task of test (part 1) and running of the application (part 2).
Your task is create server with one route, that will return current USD rate for cryptocurrency provided as parameter.
http://localhost:3000/rates?currency=bitcoin
http://localhost:3000/rates?currency=ethereum
{
"usd": "1536.8376043904155762"
}
- Cryptocurrency API for rates: https://docs.coincap.io/
- As parameter we can pass any cryptocurrency that provided with coincap API.
- If pass not existing value, need to show error message, and change response status to 404.
When you finish task, send link with your github repo to HR manager.
- 2.1.1 Install NodeJS 18.8.0
- 2.1.2 Open a folder with this project, run a terminal command
npm start
- 2.1.3 Open your browser and type
http://localhost:3000/rates
- 2.1.4 For stopping type CTRL+C on the terminal window
OR Run this application via Docker
- 2.2.1 Install Docker
- 2.2.2 Open a folder with this project, and build the app via running a terminal command (with dot at the end)
docker build -t onix/internship2022 .
- 2.2.3 Start the container
docker run --rm -p 3000:3000 -it onix/internship2022
- 2.2.4 Open your browser and type
http://localhost:3000/rates
- 2.2.5 For stopping type CTRL+C on the terminal window
- Run ESLint
npm run eslint