DEV Community

Ashish Agre
Ashish Agre

Posted on

2 1

Angular App and Spring Boot Api for Country, State and City

Introduction

Address WebApi and test example to display
Country, State and City

Prerequisite

  • Java SDK
  • node.js

Building Backend

https://gitlab.com/address-api/api-server.git

Create Database in mysql create database address_api_db;

Export Env variable

MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_SECRET=my_super_secret_password

Execute maven command to run project

./mvnw spring-boot:run

API Details

Building Frontend

https://gitlab.com/address-api/frontend.git

Build

ng build

Run

ng serve

Navigate to http://localhost:4200

Demo

Ref:

Thanks to https://github.com/hiiamrohit/Countries-States-Cities-database 🙇

Source
https://silentsudo.gitlab.io/post/angular/2020-05-19-api-country-state-city/

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay