Giter Club home page Giter Club logo

am_country_city's Introduction

Вспомогательный проект для ActiveMap Starter

structure

файл public/countries.json и
файл source/countries+states+cities.json
это исходники из репозитория https://github.com/dr5hn/countries-states-cities-database

Файл source/countries+states+cities.json парсит скрипт source/parse.js и раскладывает сгенерированные файлы в public/countries/*.json

После делается сommit + push и начинает работать github actions.
Папка public деплоится в firebase hosting проекта am-country-city (владелец [email protected])

После эти данные становятся доступными на хосте am-country-city.web.app

usage

Чтобы получить список стран
https://am-country-city.web.app/countries.json

Чтобы получить список городов по стране надо передать iso2 аббревиатуру страны в запрос
https://am-country-city.web.app/countries/{iso2}.json

Список городов сгруппирован по штатам / регионам. Использовать эту информацию как subtitle.
Использовать поле native, если оно не null, чтобы отображать нативное написание города / страны

regenerate

подложить новые файлы public/countries.json и source/countries+states+cities.json

запустить

cd source
npm install
npm test
git add .
git commit -m "regenerate files"
git push

осторожно, если файлы правились руками, это затрет ручные изменения

install details

console output

✔ Created service account github-action-580878340 with Firebase Hosting admin permissions. ✔ Uploaded service account JSON to GitHub as secret FIREBASE_SERVICE_ACCOUNT_AM_COUNTRY_CITY. i You can manage your secrets at https://github.com/nailgilaziev/am_country_city/settings/secrets.

? Set up the workflow to run a build script before every deploy? Yes ? What script should be run before every deploy? npm ci && npm run build

✔ Created workflow file /Users/ng/web/am_country_city/.github/workflows/firebase-hosting-pull-request.yml ? Set up automatic deployment to your site's live channel when a PR is merged? Yes ? What is the name of the GitHub branch associated with your site's live channel? main

✔ Created workflow file /Users/ng/web/am_country_city/.github/workflows/firebase-hosting-merge.yml

i Action required: Visit this URL to revoke authorization for the Firebase CLI GitHub OAuth App: https://github.com/settings/connections/applications/89cf50f02ac6aaed3484

am_country_city's People

Contributors

nailgilaziev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.