Skip to content

gaboroa14/dolaradiario-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dolaradiario-backend

Backend server of Dolar a Diario, a platform to check for the current Venezuelan price as reported by three different sources: DolarToday, BCV and MonitorDolar. Allows also for Petro integration but it's disabled by default.

Used technologies

  • Deno v1.9.0
  • Postgres client for Deno
  • Oak
  • SimpleTwitter
  • Heroku for deployment

How to run

Make sure you config a PostgreSQL Database in config/database.ts. Also, configure a valid Twitter Developer API credentials object in fetch/apiFetching.ts. Then, run as follow:

deno run --allow-net --allow-read --allow-env --unstable index.ts

How it works

Every 30 minutes, at xx:05 or xx:35, it'll contact the DolarToday API and Twitter API to check for price changes in DolarToday, BCV and MonitorDolar prices. If found, it'll store them in a local database. If found and it's already recorded in the database, then it won't record it.

Server offers two main endpoints:

/main sends you an object with the most recent prices by providers and a list of all providers.
/history sends you an object list with all the prices recorded in the last 30 days.

Both of them work as GET requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published