mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 12:32:10 +01:00
- Implemented API session retrieval in `lib/api-auth.ts` to manage user sessions. - Created authentication options in `lib/auth-options.ts` using NextAuth.js with credentials provider. - Added migration scripts to create necessary tables for authentication in `migrations/0002_create_auth_tables.sql` and `prisma/migrations/20250601033219_add_nextauth_tables/migration.sql`. - Configured ESLint with Next.js and TypeScript support in `eslint.config.mjs`. - Updated Next.js configuration in `next.config.ts` for Cloudflare compatibility. - Defined Cloudflare Worker configuration in `open-next.config.ts` and `wrangler.jsonc`. - Enhanced type definitions for authentication in `types/auth.d.ts`. - Created a Cloudflare Worker entry point in `src/index.ts.backup` to handle API requests and responses.
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
};
|
|
|
|
export default nextConfig;
|
|
|
|
// added by create cloudflare to enable calling `getCloudflareContext()` in `next dev`
|
|
import { initOpenNextCloudflareForDev } from '@opennextjs/cloudflare';
|
|
initOpenNextCloudflareForDev();
|
|
|
|
// /**
|
|
// * @type {import('next').NextConfig}
|
|
// **/
|
|
// const nextConfig = {
|
|
// reactStrictMode: true,
|
|
|
|
// // Allow cross-origin requests from specific origins in development
|
|
// allowedDevOrigins: [
|
|
// "192.168.1.2",
|
|
// "localhost",
|
|
// "propc",
|
|
// "test123.kjanat.com",
|
|
// ],
|
|
|
|
// // Cloudflare Pages optimization
|
|
// trailingSlash: false,
|
|
|
|
// // Environment variables that should be available to the client
|
|
// env: {
|
|
// AUTH_URL: process.env.AUTH_URL,
|
|
// },
|
|
|
|
// // Experimental features for Cloudflare compatibility
|
|
// experimental: {
|
|
// // Future experimental features can be added here
|
|
// },
|
|
|
|
// // Image optimization - Cloudflare has its own image optimization
|
|
// images: {
|
|
// unoptimized: true,
|
|
// },
|
|
// };
|
|
|
|
// export default nextConfig;
|