/serveless_functions_ibge

Functions que retornam informações sobre localizações disponibilizadas pela API do IBGE, que serão reutilizadas em outros projetos

Primary LanguageJavaScript

IBGE Serveless Functions

This project is published in

URL Base: https://ibgefunctions.netlify.app/.netlify

Netlify Status

GitHub top language

GitHub last commit

ℹ️ How To Use

To clone and run this application, you'll need Git, Node.js v10.16 or higher + [Yarn v1.13][yarn] or higher installed on your computer. From your command line:

  • Dev Mode

# Clone this repository
$ git clone https://github.com/leoguilen/serveless_functions_ibge.git

# Install dependencies
$ npm install

# Run the app
$ npm start

You can test in browser using url http://localhost:9000. Routes to functions:

/functions/estados - Return all states of brazil
// http://localhost:9000/estados

[
  {...},
  {
    "id": 35,
    "sigla": "SP",
    "nome": "São Paulo",
    "regiao": {
      "id": 3,
      "sigla": "SE",
      "nome": "Sudeste"
    }
 }
]

/functions/cidades?uf={uf do estado} - Return all cities in specific state

// http://localhost:9000/cidades?uf=SP

[
  {...},
  {
    "nome": "Adamantina"
  },
]

Made with ♥ by Leonardo Guilen 👋 Get in touch!