Skip to content

OultimoCoder/cloudflare-country-codes-api

Repository files navigation

Cloudflare Country Codes API

A simple API that uses the CF-IPCountry header in a Cloudflare worker to determine the requests country and then return a list of information about said country.

Uses Cloudflare Workers and Hono.

Try Me!

Commands

Running locally:

npm run dev

Testing:

# run all tests
npm run tests

# run test coverage
npm run tests:coverage

# run test coverage summary
npm run tests:summary

Linting:

# run ESLint
npm run lint

# fix ESLint errors
npm run lint:fix

# run prettier
npm run prettier

# fix prettier errors
npm run prettier:fix

Deploy to Cloudflare:

npm run deploy:dev
npm run deploy:prod

License

MIT

About

A simple Cloudflare Workers API utilising Hono to return country information such as country code, emoji flag, languages etc based on the request ip address

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors