Skip to content

mbemvieira/anp-back-end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ANP Back-End

Web service that collects data from ANP Website and provides it as an API (http://www.anp.gov.br/preco/prc/Resumo_Por_Estado_Index.asp)

Installation

  1. On root folder for Node libraries installation $ npm install

  2. On 'config/config.json', set the Database info

  3. Setup the databse with migrations and seeders:

Create all the necessary tables on the DB: ./node_modules/.bin/sequelize db:migrate

Fill the 'states' table with basic info: ./node_modules/.bin/sequelize db:seed --seed seeders/20161115013456-StateSeeder.js

Fill the 'states' table with basic info: ./node_modules/.bin/sequelize db:seed --seed seeders/20161114181126-FuelTypeSeeder.js

  1. Put the web service up $ npm start

  2. Routes:

Welcome page (for testing purposes): 'localhost:3005/api/v1/'

Fuel prices API (returns JSON with all the data): 'localhost:3005/api/v1/prices'

Web scrap the ANP's website and save on DB: 'localhost:3005/api/v1/prices/web-scraper'

About

NodeJS back-end API for web scraping data from Brazilian's ANP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages