This project is a simple Node.js script that reads football club data from a JSON file and uploads it to a Supabase database. This was all made with Cursor AI and OpenAI and OMG this is so cool.
- Node.js installed on your machine
- A Supabase account and project set up
- A JSON file named
football_clubs.json
containing the football club data
- Clone this repository:
git clone https://github.com/your-username/football-clubs-uploader.git
cd football-clubs-uploader
npm install
- Create a
.env
file in the root directory and add your Supabase credentials:
SUPABASE_URL=your_supabase_project_url
SUPABASE_API_KEY=your_supabase_api_key
- Ensure your
football_clubs.json
file is in the root directory of the project.
Run the script using Node.js:
The script will read the data from football_clubs.json
and insert it into your Supabase database table named football_clubs
.
upload.js
: The main script that reads the JSON file and uploads data to Supabase.football_clubs.json
: JSON file containing the football club data (not included in the repository)..env
: Contains your Supabase credentials (not included in the repository)..env.example
: An example of the required environment variables..gitignore
: Specifies which files should be ignored by Git.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.