Sign inSign up

weaponsforge/ph-regions

By weaponsforge

•Updated about 2 months ago

A RESTful API that serves hierarchical location data of the Philippines for testing purposes

Image
API management
Developer tools
0

656

weaponsforge/ph-regions repository overview

⁠ph-regions

A RESTful API that serves hierarchical location data of the Philippines — including regions, provinces, municipalities, and a randomly generated number of barangays per municipality.

This API is intended for testing and simulating RESTful API requests from client applications.
Note: The location data may be outdated and does not reflect the most current official records.

This image is only for development and testing purposes.


Live Preview
https://ph-regions.vercel.app⁠

GitHub Repository
https://github.com/weaponsforge/ph-regions⁠

⁠Usage

  1. Clone the project repository.
    https://github.com/weaponsforge/ph-regions.git

  2. Create a .env file in the cloned project's /server directory using the .env.example for reference.

    • Visit the README.md file of the ph-regions⁠⁠ GitHub repository for more information about the .env file contents.
  3. Pull the image using Docker compose.
    docker pull

  4. Run the container.
    docker compose up

  5. Create (seed) initial data.
    docker compose exec -it weaponsforge-ph-regions npm run seed

  6. View the API documentation at:
    http://localhost:3001



⁠Available Scripts

⁠npm start

Runs the compiled (JavaScript) server app for production mode.

⁠npm run dev

Runs the app for local development (when using Node).

⁠npm run seed

Runs the database seeder script, inserting initial data contents to the database.

⁠npm run docs:gen

Generates the OpenAPI openapi.yaml (YAML) and openapi.json (JSON) files into the /server/public directory.

⁠npm run docs:build

Builds the API documentation using the Redocly CLI⁠ into the /server/public/index.html file.

Tag summary

Content type

Image

Digest

sha256:979a81dd2…

Size

111.4 MB

Last updated

about 2 months ago

docker pull weaponsforge/ph-regions