Photo by Elena Mozhvilo on Unsplash
Wait for the fetch('api/country')
to show where you come from.
- fork or clone this repository and go into its folder
- download IPV4 CSV
- copy the unzipped
IP2LOCATION-LITE-DB1.CSV
file into the folder - create an
sqlite
directory (mkdir -p sqlite
) and runsqlite3 sqlite/ip2location.ipv4
- copy and paste ip2location.ipv4.sql content in the SQLite shell
- run
npx vercel --prod
to deploy
While having a static, read-only, SQLite database on vercel could be handy in various situations, you cannot upload more than 100MB as deploy/build size in there, so be aware this technique might not scale.