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/

API Trace View

Struggling with slow API calls?

Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DreamFactory generates live REST APIs from database schemas with standardized endpoints for tables, views, and procedures in OpenAPI format. We support on-prem deployment with firewall security and include RBAC for secure, granular security controls.

See more!

👋 Kindness is contagious

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

Okay