Skip to content

999max/service_rabbitmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather service

The project allows to get the current temperature in the requested city.

This is a simple project that demonstrates how to use RabbitMQ. To simplify, a file with cities and their coordinates was used instead of a database.

How to run

  1. Clone repo and run
npm i
  1. Create .env file (like '.env example'). You also need yandex_weather_api_key

  2. Run docker with RabbitMQ:

docker run -d -p 5672:5672 rabbitmq
  1. Run server:
node server.js
  1. Run service:
node weather.js

Testing

Now we can test it by sending request

$ curl http://localhost:{PORT}/cities/astana

Todo

  • Move logic from server.js to controller.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published