Skip to content

WebReflection/vercel-sqlite-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vercel SQLite ip2location demo

Photo by Elena Mozhvilo on Unsplash

Wait for the fetch('api/country') to show where you come from.

How to test

  • 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 run sqlite3 sqlite/ip2location.ipv4
  • copy and paste ip2location.ipv4.sql content in the SQLite shell
  • run npx vercel --prod to deploy

Please Note

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.

About

Vercel SQLite ip2location demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published