packages/insights/README.md
Ensure you have .env.local set up like so:
PRIVATE_LIBSQL_DB_URL=ws://127.0.0.1:8080
PRIVATE_LIBSQL_DB_API_TOKEN=(none)
PRIVATE_AUTH_BASE_API=/api/auth
npm run db.local
in another window
npm run db.migrate
If you would like to run the application with production database set up .env.local like so:
PRIVATE_LIBSQL_DB_URL=libsql://qwik-bundalyzer-mhevery.turso.io
PRIVATE_LIBSQL_DB_API_TOKEN=<API_TOKEN>
PRIVATE_AUTH_SECRET=<AUTH_SECRET>
PRIVATE_AUTH_BASE_API=/api/auth
You need two pieces of information:
AUTH_SECRET:
turso auth login to authenticateturso auth api-tokens mint insights-<you-username> to get a new tokenAPI_TOKEN: This is needed for using github as authentication. See: https://qwik.dev/docs/integrations/authjs/#github